-
Notifications
You must be signed in to change notification settings - Fork 97
/
GmailExploit.py
48 lines (42 loc) · 1.11 KB
/
GmailExploit.py
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
import string
import urllib2
import time
emailList = []
attempts = 0
total = 0
skip = 0
gmailAddress = "<Insert_Gmail_Address>"
inviteToken = "<Insert_Token>"
def insertDots(str, at):
if at == 0:
emailList.append(str)
return
newStr = str[:at] + "." + str[at:]
for i in range(at):
insertDots(newStr, i)
def allDots(str):
for i in range(len(str)):
insertDots(str, i)
allDots(gmailAddress.replace(".", ""))
total = len(emailList)
print "Count: {}".format(total)
print "List: "
print emailList
print
for email in emailList:
attempts += 1
if (attempts <= skip):
continue
requestUrl = "https://invites.oneplus.net/index.php?r=share/signup&success_jsonpCallback&email={0}%40gmail.com&koid={1}&_=1438677876942".format(email, inviteToken)
print("Sending invite to " + email + "@gmail.com ({}/{}) ...".format(attempts, total))
req = urllib2.Request(requestUrl)
try:
res = urllib2.urlopen(req)
except urllib2.HTTPError as e:
resCode = e.code
print("Request Failed: {}.".format(resCode))
except urllib2.URLError as e:
print("Request Failed: URL Error.")
else:
print("Successful Response.")
time.sleep(15)