Advertisement
Br1in

SwapWeb & LoginWeb

Mar 6th, 2021 (edited)
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. import requests, threading, sys
  2. print("""
  3. ██████╗ ███████╗ ██╗ ██████╗ ██████╗
  4. ██╔═══██╗╚════██║███║██╔═══██╗██╔════╝
  5. ██║██╗██║ ██╔╝╚██║██║ ██║██║
  6. ██║██║██║ ██╔╝ ██║██║ ██║██║
  7. ╚█║████╔╝ ██║ ██║╚██████╔╝╚██████╗
  8. ╚╝╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝
  9. """)
  10. m = ''
  11. t = ''
  12. username = input("[US] Username : ")
  13. password = input("[PS] Password : ")
  14. target = input("[TR] Target : ")
  15. thread = int(input("[TH] Thread : "))
  16. headers = {
  17. 'user-agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36',
  18. 'x-csrftoken': 'xX0K5q7XikrU1LAnenqEVKqb7J3qK4S6',
  19. 'x-ig-app-id': '936619743392459',
  20. 'x-instagram-ajax': '0c15f4d7d44a',
  21. 'x-requested-with': 'XMLHttpRequest'
  22. }
  23. Att = 0
  24. email = ''
  25. phone = ''
  26. def edit():
  27. global cookies, Att
  28. try:
  29. r = requests.get('https://www.instagram.com/accounts/edit/?__a=1', headers=headers, cookies=cookies)
  30. email = r.json()['form_data']['email']
  31. phone = r.json()['form_data']['phone_number']
  32. except:
  33. email = email
  34. phone = phone
  35. data = {
  36. 'first_name': '',
  37. 'email': email,
  38. 'username': target,
  39. 'phone_number': phone,
  40. 'biography': '',
  41. 'external_url': '',
  42. 'chaining_enabled': 'on'
  43. }
  44. hed ={
  45. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0',
  46. "accept": "*/*",
  47. "accept-language": "en-US,en;q=0.9",
  48. "content-type": "application/x-www-form-urlencoded",
  49. "sec-ch-ua": "\"Chromium\";v=\"88\", \"Google Chrome\";v=\"88\", \";Not A Brand\";v=\"99\"",
  50. "sec-ch-ua-mobile": "?0",
  51. "sec-fetch-dest": "empty",
  52. "sec-fetch-mode": "cors",
  53. "sec-fetch-site": "same-origin",
  54. "X-Forwarded-For": "127.0.0.1",
  55. "cookie": f"csrftoken = lHu2G6ufrioyFae7vIoGcGp1KqQrFwsz; mid=YBKjjQABAAEPTdtEMhPWWkk2bTmt; ds_user=71oc; igfl=71oc; ds_user_id=43805713213; sessionid={cookies['sessionid']}; rur=FTW; urlgen=""""{\""104.248.132.80\"": ""14061}:1l55ih:ZNLfYDbSXdajQO6fS7AJKWjoAbs""""; is_starred_enabled=yes",
  56. "x-csrftoken": "lHu2G6ufrioyFae7vIoGcGp1KqQrFwsz",
  57. "x-ig-app-id": "936619743392459",
  58. "x-ig-www-claim": "hmac.AR1bu79iGjS6uRI_mZP2RUj8pSnIBTZShHgt5Jltb_549G1Z",
  59. "x-instagram-ajax": "1cb44f68ffec",
  60. "x-requested-with": "XMLHttpRequest"
  61. }
  62. while True:
  63. try:
  64. req = requests.post('https://www.instagram.com/accounts/edit/', data=data, headers=hed)
  65. if req.status_code == 200:
  66. print(f'\r[DN] Swapped @{target}', end='')
  67. break
  68. sys.exit()
  69. elif req.status_code == 400:
  70. Att += 1
  71. print(f'\r[REQ] Request > {Att}', end='')
  72. elif req.status_code == 429:
  73. print(f'\r[BLC] Blocked @{username}', end='')
  74. break
  75. sys.exit()
  76. except:
  77. edit()
  78. data = {
  79. "username": username,
  80. "enc_password": f"#PWD_INSTAGRAM_BROWSER:0:&:{password}",
  81. "queryParams": "{}",
  82. "optIntoOneTap": "false"
  83. }
  84. url = "https://www.instagram.com/accounts/login/ajax/"
  85. req = requests.post(url, data=data, headers=headers)
  86. if "Please wait a few minutes before you try again." in req.text:
  87. print("[PWA] Please wait a few minutes before you try again.")
  88. elif ("checkpoint_url") in req.text:
  89. ch = req.json()['checkpoint_url']
  90. cookies = req.cookies
  91. ur = 'https://www.instagram.com' + ch
  92. re = requests.post(ur, data="", headers=headers, cookies=cookies)
  93. if ("phone_number") in re.text:
  94. print("[PH] Phone : 0")
  95. t = 'ph'
  96. if ("email") in re.text:
  97. print("[EM] Email : 1")
  98. m = 'em'
  99. if m == 'em':
  100. m = 'em'
  101. elif t == 'ph':
  102. t = 'ph'
  103. else:
  104. print("[UN] Unknown")
  105. input()
  106. sys.exit()
  107. choice = input("[ED] Enter Mode : ")
  108. datt = {
  109. "choice": choice
  110. }
  111. re = requests.post(ur, data=datt, headers=headers, cookies=cookies)
  112. if ("security_code") in re.text:
  113. if choice == "1":
  114. print("[DN] Done Send To Email")
  115. elif choice == "0":
  116. print("[DN] Done Send To Phone")
  117. Code = input("[EC] Enter Code : ")
  118. da = {
  119. "security_code": Code
  120. }
  121. r = requests.post(ur, headers=headers, data=da, cookies=cookies)
  122. if ("ok") in r.text:
  123. cookies = r.cookies
  124. print(f'[DN] Done Login @{username}')
  125. input('[AYR] Are You Ready ?')
  126. threads = []
  127. for i in range(thread):
  128. th = threading.Thread(target=edit)
  129. th.start()
  130. threads.append(th)
  131. for thread2 in threads:
  132. thread2.join()
  133. else:
  134. print("[EC] Code Error")
  135. elif ("userId") in req.text:
  136. cookies = req.cookies
  137. print(f'[DN] Done Login @{username}')
  138. input('[AYR] Are You Ready ?')
  139. threads = []
  140. for i in range(thread):
  141. th = threading.Thread(target=edit)
  142. th.start()
  143. threads.append(th)
  144. for thread2 in threads:
  145. thread2.join()
  146. elif ("two_factor") in req.text:
  147. ss = req.json()['two_factor_info']['two_factor_identifier']
  148. cookies = req.cookies
  149. Code = input("[EC] Enter Code : ")
  150. data = {
  151. 'username': username,
  152. 'verificationCode': Code,
  153. 'identifier': ss,
  154. 'queryParams': '{"next":"/"}'
  155. }
  156. re = requests.post('https://www.instagram.com/accounts/login/ajax/two_factor/', headers=headers, data=data, cookies=cookies)
  157. if ("userId") in re.text:
  158. cookies = re.cookies
  159. print(f'[DN] Done Login @{username}')
  160. input('[AYR] Are You Ready ?')
  161. threads = []
  162. for i in range(thread):
  163. th = threading.Thread(target=edit)
  164. th.start()
  165. threads.append(th)
  166. for thread2 in threads:
  167. thread2.join()
  168. elif ("Please wait a few minutes before you try again.") in re.text:
  169. print("[PWA] Please wait a few minutes before you try again.")
  170. else:
  171. print("[EC] Code Error")
  172. else:
  173. print('[WUP] Wrong Username Or Password')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement