Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.86 KB | None | 0 0
  1. import requests
  2. import json
  3. import threading
  4. import time
  5. import random
  6.  
  7. #deal with config.json
  8.  
  9. with open("config.json") as file:
  10. config = json.load(file)
  11.  
  12. username = config['username']
  13. password = config['password']
  14.  
  15. targets = config['targetUsernames']
  16.  
  17. #this is so I can dynamically change the endpoint
  18. endpoint = requests.get("https://www.xosoftware.app/github/instaturbo/endpoint").text.replace("\n", "")
  19.  
  20.  
  21. def turbo(nam):
  22.  
  23. #login to instagram, create a session and get a csrf for later
  24. s = requests.session()
  25.  
  26. print(f"[{nam}] Logging Into {username}...")
  27. url1 = "https://www.instagram.com/accounts/login/"
  28.  
  29. r1 = s.get(url1)
  30.  
  31. csrf1 = r1.cookies.get_dict()['csrftoken']
  32.  
  33. url2 = 'https://www.instagram.com/accounts/login/ajax/'
  34.  
  35. h2 = {
  36. 'accept': '*/*',
  37. 'accept-encoding': 'gzip, deflate, br',
  38. 'accept-language': 'en-US,en;q=0.9',
  39. 'content-type': 'application/x-www-form-urlencoded',
  40. 'origin': 'https://www.instagram.com',
  41. 'referer': 'https://www.instagram.com/accounts/login/',
  42. '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',
  43. 'x-csrftoken': csrf1,
  44. 'x-instagram-ajax': '1',
  45. 'x-requested-with': 'XMLHttpRequest'
  46. }
  47.  
  48. data2 = {
  49. 'username': username,
  50. 'password': password,
  51. 'queryParams': '{}'
  52. }
  53.  
  54. r2 = s.post(url2, headers=h2, data=data2)
  55.  
  56. if r2.json()['authenticated'] == False:
  57. print(f'[{nam}] ERROR LOGGING IN...')
  58. exit()
  59. else:
  60. csrf = r2.cookies.get_dict()['csrftoken']
  61. print(f'[{nam}] Logged In Initiating Turbo...')
  62. turboin = True
  63. #start monitoring the username
  64. while turboin == True:
  65. res = requests.get(endpoint.replace("<username>", nam))
  66. if res.status_code == 404:
  67. print(f'[{nam}] NAME AVAILABLE TAKING IT')
  68. urlf = "https://www.instagram.com/accounts/edit/"
  69.  
  70. hf = {
  71. 'accept': '*/*',
  72. 'accept-encoding': 'gzip, deflate, br',
  73. 'accept-language': 'en-US,en;q=0.9',
  74. 'content-type': 'application/x-www-form-urlencoded',
  75. 'origin': 'https://www.instagram.com',
  76. 'referer': 'https://www.instagram.com/accounts/edit/',
  77. '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',
  78. 'x-csrftoken': csrf,
  79. 'x-instagram-ajax': '1',
  80. 'x-requested-with': 'XMLHttpRequest'
  81. }
  82.  
  83. df = {
  84. 'first_name': 'sdouhfwufv sdvcwc',
  85. 'email': "{}xo@xolovesyou.online".format(str(random.randint(11111111, 99999999))),
  86. 'username': nam,
  87. 'phone_number':'',
  88. 'gender': '3',
  89. 'biography':'turbo by xodev',
  90. 'external_url':'https://www.xodev.io',
  91. 'chaining_enabled': 'on'
  92. }
  93. #change the acc to the turbo name
  94. rf = s.post(urlf, headers=hf, data=df)
  95. print(f'[{nam}] Completed Turbo Killing Thread')
  96. turboin = False
  97.  
  98.  
  99. if __name__ == '__main__':
  100. print("INSTATURBO")
  101. print("XO | TCWTEAM | @ehxohd")
  102. print("")
  103. print("-" * 30)
  104. print(f"Username: {username}")
  105. print("Password: {}".format("*" * len(password)))
  106. print("# Of Targets: {}".format(str(len(targets))))
  107. print(f"Endpoint: {endpoint}")
  108. print("-" * 30)
  109. print("")
  110. tin = input("Would you like to start (y/n)?: ")
  111. if tin.lower() == "y":
  112. for x in targets:
  113. #print(x)
  114. t = threading.Thread(target=turbo, args=(x, ))
  115. t.start()
  116. else:
  117. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement