Repository navigation
Expand file tree
/
Copy pathSheikh.py
More file actions
63 lines (54 loc) · 2.72 KB
/
Copy pathSheikh.py
File metadata and controls
63 lines (54 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import requests
from random import getrandbits
from time import sleep
from bs4 import BeautifulSoup
main_url = 'http://app.bronto.com/public/webform/render_form/az29kh7x0eyaepdiyjrpwnoaucqqy/8d8606e3ebfefedc32115d645e3832e7/addcontact'
form_url = 'http://app.bronto.com/public/webform/process/'
headers = {'User-Agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'}
session = requests.Session()
session.headers.update(headers)
# CHANGE the fields as the comments say
def send_form(limit):
fid, sid, sitekey = sitekey_search()
api_key = '' # COPY YOUR 2CAPTCHA KEY HERE.
for i in range(1, limit):
email = 'youremail+{}@gmail.com'.format(getrandbits(40)) # put your email in for your email
cap_id = session.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(api_key, sitekey, main_url)).text.split('|')[1]
cap_answer = session.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(api_key, cap_id)).text
while 'CAPCHA_NOT_READY' in cap_answer:
print('Waiting for captcha. Sleeping!')
sleep(6)
cap_answer = session.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(api_key, cap_id)).text
try:
return_cap = cap_answer.split('|')[1]
except IndexError:
pass
payload = {
"fid": fid, # dont change
"sid": sid, # dont change
"delid": "", # dont change
"subid": "", # dont change
"td": "", # dont change
"formtype": "addcontact", # dont change
"90298[29288859]": '', # PUT YOUR FIRST NAME HERE
"90299[29288860]": '', # PUT YOUR LAST NAME HERE
"90300": email, # dont change
"90301[29288866]" : "9.5", # PUT YOUR SHOE SIZE HERE
"90302[29289136]": "", # dont change
"90303[29289137]": "Agree to Terms", # dont change
"90307[899049]": "true", # dont change
"g-recaptcha-response": return_cap # dont change
}
resp = requests.post(main_url, data=payload, headers=headers)
print('{}/{} registered with {}.'.format(i, limit, email))
# finds sitekey, sid, and fid
# fid and sid are found in main_url... just in case it changes, i guess?
def sitekey_search():
response = session.get(main_url)
soup = BeautifulSoup(response.content, 'html.parser')
fid, sid = soup.find("input", {"name": "fid"})['value'], soup.find("input", {'name':'sid'})['value']
sitekey = soup.find("div", {"class":"g-recaptcha"})["data-sitekey"]
return (fid, sid, sitekey)
if __name__ == "__main__":
send_form(10000)