Advertisement
Guest User

Untitled

a guest
May 10th, 2019
432
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. import requests
  2. import json
  3. import threading
  4. import time
  5. import random
  6. from multiprocessing import Process
  7. from tkinter import *
  8.  
  9.  
  10. def info(l):
  11. #create temporary strings
  12. tempu = str(input('\nusername:'))
  13. tempp = str(input('password:'))
  14. tempt = str(input('target:'))
  15.  
  16. l['username'] = tempu
  17. l['password'] = tempp
  18. l['target'] = tempt
  19. return l
  20.  
  21. def turbo():
  22. params = {}
  23. log = info(params)
  24.  
  25. #sesssion
  26.  
  27. s = requests.session()
  28.  
  29. url1 = "https://www.instagram.com/accounts/login/"
  30.  
  31. r1 = s.get(url1)
  32.  
  33. csrf1 = re.findall(r'csrf_token":".*', r1.text)
  34. csrf1 = re.split(r'"', csrf1[0])
  35. csrf1 = csrf1[2]
  36.  
  37. url2 = 'https://www.instagram.com/accounts/login/ajax/'
  38.  
  39.  
  40. #login info
  41.  
  42. username = log['username']
  43.  
  44. password = log['password']
  45.  
  46. targets = log['target']
  47.  
  48. data2 = {
  49. 'username': username,
  50. 'password': password,
  51. 'queryParams': '{}'
  52. }
  53.  
  54. #headers
  55.  
  56. h2 = {
  57. 'accept': '*/*',
  58. 'accept-encoding': 'gzip, deflate, br',
  59. 'accept-language': 'en-US,en;q=0.9',
  60. 'content-type': 'application/x-www-form-urlencoded',
  61. 'origin': 'https://www.instagram.com',
  62. 'referer': 'https://www.instagram.com/accounts/login/',
  63. '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',
  64. 'x-csrftoken': csrf1,
  65. 'x-instagram-ajax': '1',
  66. 'x-requested-with': 'XMLHttpRequest'
  67. }
  68.  
  69. #init
  70.  
  71. r2 = s.post(url2, headers=h2, data=data2)
  72.  
  73.  
  74. if r2.json()['authenticated'] == False:
  75. print('Error logging in, retry.')
  76.  
  77. time.sleep(.2)
  78. turbo()
  79. else:
  80. csrf = r2.cookies.get_dict()['csrftoken']
  81. print('Authenticated')
  82.  
  83. turboin = True
  84. #start monitoring the username
  85. tryn = 0
  86. while turboin == True:
  87. res = requests.get('https://www.instagram.com/{0}'.format(log['target']))
  88. tryn = tryn + 1
  89. print('{0}, {1}, {2}\r'.format(tryn, log['target'], res))
  90. if res.status_code == 404:
  91.  
  92.  
  93. #init url
  94.  
  95. urlf = "https://www.instagram.com/accounts/edit/"
  96.  
  97. #post new data
  98.  
  99. hf = {
  100. 'accept': '*/*',
  101. 'accept-encoding': 'gzip, deflate, br',
  102. 'accept-language': 'en-US,en;q=0.9',
  103. 'content-type': 'application/x-www-form-urlencoded',
  104. 'origin': 'https://www.instagram.com',
  105. 'referer': 'https://www.instagram.com/accounts/edit/',
  106. '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',
  107. 'x-csrftoken': csrf,
  108. 'x-instagram-ajax': '1',
  109. 'x-requested-with': 'XMLHttpRequest'
  110. }
  111.  
  112. df = {
  113. 'first_name': 'sfp',
  114. 'email': '{}sfpapocteam@gmail.com'.format(str(random.randint(11111111, 99999999))),
  115. 'username': log['target'],
  116. 'phone_number':'',
  117. 'gender': '1',
  118. 'biography':'sfp',
  119. 'external_url':'',
  120. 'chaining_enabled': 'on'
  121. }
  122. #change the acc to the turbo name
  123. s.get(urlf, headers=hf, data=df)
  124. print("Claimed, @{0}".format(log['target']))
  125. turboin = False
  126. exit()
  127. sys.exit()
  128.  
  129.  
  130.  
  131. if __name__ == '__main__':
  132. print("Welcome to turbo")
  133.  
  134. #turbo()
  135. t = threading.Thread(target=turbo())
  136. t.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement