forked from Brett-Kavanaugh/instaturbo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathturbo.py
More file actions
117 lines (97 loc) · 3.75 KB
/
turbo.py
File metadata and controls
117 lines (97 loc) · 3.75 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import requests
import json
import threading
import time
import random
#deal with config.json
with open("config.json") as file:
config = json.load(file)
username = config['username']
password = config['password']
targets = config['targetUsernames']
#this is so I can dynamically change the endpoint
endpoint = requests.get("https://www.xosoftware.app/github/instaturbo/endpoint").text.replace("\n", "")
def turbo(nam):
#login to instagram, create a session and get a csrf for later
s = requests.session()
print(f"[{nam}] Logging Into {username}...")
url1 = "https://www.instagram.com/accounts/login/"
r1 = s.get(url1)
csrf1 = r1.cookies.get_dict()['csrftoken']
url2 = 'https://www.instagram.com/accounts/login/ajax/'
h2 = {
'accept': '*/*',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9',
'content-type': 'application/x-www-form-urlencoded',
'origin': 'https://www.instagram.com',
'referer': 'https://www.instagram.com/accounts/login/',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
'x-csrftoken': csrf1,
'x-instagram-ajax': '1',
'x-requested-with': 'XMLHttpRequest'
}
data2 = {
'username': username,
'password': password,
'queryParams': '{}'
}
r2 = s.post(url2, headers=h2, data=data2)
if r2.json()['authenticated'] == False:
print(f'[{nam}] ERROR LOGGING IN...')
exit()
else:
csrf = r2.cookies.get_dict()['csrftoken']
print(f'[{nam}] Logged In Initiating Turbo...')
turboin = True
#start monitoring the username
while turboin == True:
res = requests.get(endpoint.replace("<username>", nam))
if res.status_code == 404:
print(f'[{nam}] NAME AVAILABLE TAKING IT')
urlf = "https://www.instagram.com/accounts/edit/"
hf = {
'accept': '*/*',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9',
'content-type': 'application/x-www-form-urlencoded',
'origin': 'https://www.instagram.com',
'referer': 'https://www.instagram.com/accounts/edit/',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36',
'x-csrftoken': csrf,
'x-instagram-ajax': '1',
'x-requested-with': 'XMLHttpRequest'
}
df = {
'first_name': 'sdouhfwufv sdvcwc',
'email': "{}xo@xolovesyou.online".format(str(random.randint(11111111, 99999999))),
'username': nam,
'phone_number':'',
'gender': '3',
'biography':'turbo by xodev',
'external_url':'https://www.xodev.io',
'chaining_enabled': 'on'
}
#change the acc to the turbo name
rf = s.post(urlf, headers=hf, data=df)
print(f'[{nam}] Completed Turbo Killing Thread')
turboin = False
if __name__ == '__main__':
print("INSTATURBO")
print("XO | TCWTEAM | @ehxohd")
print("")
print("-" * 30)
print(f"Username: {username}")
print("Password: {}".format("*" * len(password)))
print("# Of Targets: {}".format(str(len(targets))))
print(f"Endpoint: {endpoint}")
print("-" * 30)
print("")
tin = input("Would you like to start (y/n)?: ")
if tin.lower() == "y":
for x in targets:
#print(x)
t = threading.Thread(target=turbo, args=(x, ))
t.start()
else:
exit()