initial commit
This commit is contained in:
20
brute_force_hello_world.py
Executable file
20
brute_force_hello_world.py
Executable file
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user