From caddf8a767706cf64af86c950bea5128e2badbbf Mon Sep 17 00:00:00 2001 From: Daniel Cortes Date: Fri, 22 May 2020 01:51:01 -0400 Subject: [PATCH] initial commit --- brute_force_hello_world.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 brute_force_hello_world.py diff --git a/brute_force_hello_world.py b/brute_force_hello_world.py new file mode 100755 index 0000000..fb65812 --- /dev/null +++ b/brute_force_hello_world.py @@ -0,0 +1,20 @@ +import time +import sys +import random +import string + +target = 'Hello, World!' +guess = list('*'*len(target)) + +for i, c in enumerate(target): + while True: + cc = random.choice(string.ascii_letters + string.punctuation + " ") + guess[i] = cc + sys.stdout.write(f"\r{''.join(guess)}") + sys.stdout.flush() + time.sleep(0.01) + if cc == c: + break + +print('\n\nACCESS GRANTED') +