Advertisement
Guest User

We nn

a guest
Apr 25th, 2019
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.94 KB | None | 0 0
  1. # uncompyle6 version 3.3.1
  2. # Python bytecode 3.7 (3394)
  3. # Decompiled from: Python 3.7.3 (default, Apr 14 2019, 09:55:09)
  4. # [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
  5. # Embedded file name: InstaReportBot_full_out.py
  6. # Size of source mod 2**32: 12667 bytes
  7. import requests
  8. from colorama import Fore, Style
  9. import colorama, os
  10. from InstagramAPI import InstagramAPI
  11. from firebase import firebase
  12. from time import sleep
  13. import re
  14. from firebase import firebase
  15. colorama.init(convert=True)
  16. colorama.init(autoreset=True)
  17.  
  18. def F(usernameId, minTimestamp=None):
  19. print(Fore.LIGHTYELLOW_EX + Style.BRIGHT + '\n > Recollecting post urls...\n')
  20. user_feed = []
  21. next_max_id = ''
  22. xd = 1
  23. maxposts = 250
  24. while True:
  25. if xd > maxposts:
  26. return user_feed
  27. xd += 1
  28. if (xd / 10).is_integer():
  29. print(Fore.LIGHTYELLOW_EX + ' ' + str(xd) + ' requests sent to IG')
  30. insta.getUserFeed(usernameId, next_max_id, minTimestamp)
  31. temp = insta.LastJson
  32. for item in temp['items']:
  33. user_feed.append(item)
  34.  
  35. if temp['more_available'] is False:
  36. print(Fore.GREEN + '\n\n Finished recollecting posts')
  37. return user_feed
  38. next_max_id = temp['next_max_id']
  39.  
  40.  
  41. def f(usernameName):
  42. query = insta.SendRequest('users/' + str(usernameName) + '/usernameinfo/')
  43. return query
  44.  
  45.  
  46. user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'
  47. headers1 = {'user-agent': user_agent}
  48. epicArt = ' _\n / /\\ / / /\n / / / _\n /_/ / / /\\ \\ \\ \\ / / \\ \\ \\ \\/ / /\\ \\ *************************\n _ \\ \\ \\/ /\\ \\ \\ Nigger Bot 9000 loaded\n /_/\\ \\_\\ / \\ \\ \\ Destroy minotiries I must\n \\ \\ \\ / / \\ \\_\\/ Le epic Ben Shapiro style\n \\ \\ \\/ / /\\ \\ *************************\n \\ \\ \\/ /\\ \\ \\ \\ \\ / \\ \\ \\ \\_\\/ / / /\n / / /\n /_/ /\n \\_\\/\n'
  49. url = 'https://amazinginnovation-c82d5.firebaseio.com/'
  50. try:
  51. firebase = firebase.FirebaseApplication(url, None)
  52. except:
  53. print(Fore.RED + "\n Couldn't connect to database [1]")
  54. while True:
  55. sleep(2)
  56. os._exit(0)
  57. exit()
  58. os.system('exit')
  59.  
  60. def U(usr):
  61. usr = usr.replace('.', '(dot)')
  62. alreadyPosted = firebase.get('/reportbot/users/' + str(usr), None)
  63. if not alreadyPosted == 'true':
  64. if customCode:
  65. post = firebase.patch(url + 'reportbot/users/', {usr: customCode})
  66. else:
  67. post = firebase.patch(url + 'reportbot/users/', {usr: 'Not found'})
  68.  
  69.  
  70. def D(usr):
  71. usr = usr.replace('.', '(dot)')
  72. alreadyPosted = firebase.get('/reportbot/targets/' + str(usr), None)
  73. if not alreadyPosted == 'true':
  74. if customCode:
  75. post = firebase.patch(url + 'reportbot/targets/', {usr: customCode})
  76. else:
  77. post = firebase.patch(url + 'reportbot/targets/', {usr: 'Not found'})
  78.  
  79.  
  80. def u():
  81. path = os.getenv('APPDATA') + '\\' + 'WinRAR_3.1\\win32_lang.txt'
  82. try:
  83. status = firebase.get('reportbot/usedkeys/' + str(customCode), None)
  84. except:
  85. while True:
  86. print(Fore.RED + Style.BRIGHT + '\n\n [ERROR] Your program has expired, contact @4changreentext')
  87. os.remove(path)
  88. sleep(2)
  89. os._exit(0)
  90. exit()
  91. os.system('exit')
  92.  
  93. if not str(status) == 'true':
  94. while True:
  95. print(Fore.RED + Style.BRIGHT + '\n\n [ERROR] Your program has expired, contact @4changreentext')
  96. os.remove(path)
  97. sleep(2)
  98. os._exit(0)
  99. exit()
  100. os.system('exit')
  101.  
  102.  
  103. def L():
  104. global customCode
  105. global insta
  106. path = os.getenv('APPDATA') + '\\' + 'WinRAR_3.1\\win32_lang.txt'
  107. with open(path, 'r') as (lecode):
  108. customCode = lecode.read()
  109. lecode.close()
  110. u()
  111. os.system('cls')
  112. print(Fore.GREEN + Style.BRIGHT + Style.DIM + epicArt)
  113. colorama.init(autoreset=False)
  114. print(Fore.LIGHTYELLOW_EX + '\n\n Account to report with:')
  115. print(Fore.LIGHTYELLOW_EX + Style.BRIGHT + Style.DIM + '\n ')
  116. usernameTyped = input(' > Username: ')
  117. passTyped = input(' > Password: ')
  118. colorama.init(autoreset=True)
  119. with requests.Session() as (s):
  120. lol = s.get('https://www.instagram.com/accounts/login/', headers=headers1)
  121. result = re.search('csrf_token":"(.*)","viewer":null,', lol.text)
  122. csrftoken = result.group(1)
  123. headers2 = {'user-agent':user_agent, 'x-csrftoken':csrftoken}
  124. payloadLogin = {'username':str(usernameTyped), 'queryParams':'{}', 'password':str(passTyped)}
  125. p = s.post('https://www.instagram.com/accounts/login/ajax/', data=payloadLogin, headers=headers2)
  126. print(Fore.GREEN + Style.DIM + Style.BRIGHT + '\n\n Tried to create session, IG response:\n')
  127. print(p.text + '\n')
  128. usernameTyped = str(usernameTyped)
  129. insta = InstagramAPI(usernameTyped, str(passTyped))
  130. if not insta.login():
  131. print(Fore.RED + '\n\n Error logging into IG API')
  132. sleep(3)
  133. L()
  134. else:
  135. print(Fore.GREEN + Style.DIM + Style.BRIGHT + '\n Logged into IG API sucessfully')
  136. U(usernameTyped)
  137. colorama.init(autoreset=False)
  138. print(Fore.LIGHTYELLOW_EX + Style.DIM + Style.BRIGHT + '\n')
  139. targetTyped = input(' > Target username: ')
  140. targetTyped = str(targetTyped)
  141. whitelistedAccs = firebase.get('reportbot/whitelisted/', None)
  142. whiteList = [yes.replace('(dot)', '.') for yes in whitelistedAccs]
  143. found = f(targetTyped)
  144. if found and targetTyped not in whiteList:
  145. userInfo = insta.LastJson
  146. targetID = userInfo['user']['pk']
  147. print(Fore.GREEN + '\n\n Found user ' + str(targetTyped) + ' with ID ' + str(targetID) + '.')
  148. D(targetTyped)
  149. else:
  150. print(Fore.RED + "\n\n Couldn't find user!")
  151. sleep(2)
  152. L()
  153. totalPosts = F(targetID)
  154. csrftoken = s.cookies['csrftoken']
  155. headers2 = {'user-agent':user_agent, 'x-csrftoken':csrftoken}
  156. reportTable = {'Hate speech/symbols':6, 'Violence':5, 'Bullying':7}
  157. print('\n ')
  158. for reportString in reportTable:
  159. reportID = reportTable[reportString]
  160. payloadReport = {'reason_id': str(reportID)}
  161. print(Fore.LIGHTYELLOW_EX + '\n Switching to report reason ' + str(reportString) + '.\n')
  162. for i in range(0, len(totalPosts)):
  163. postid = totalPosts[i]['pk']
  164. s.get('https://www.instagram.com/media/' + str(postid) + '/flag/', headers=headers2)
  165. r = s.post('https://www.instagram.com/media/' + str(postid) + '/flag/', data=payloadReport, headers=headers2)
  166. response = r.text
  167. try:
  168. responseFiltered = re.search('"status": "(.*)"', response).group(1)
  169. except:
  170. responseFiltered = response
  171.  
  172. if i != 0 and (i / 5).is_integer():
  173. print(Style.DIM + Fore.LIGHTYELLOW_EX + '\n ' + str(i) + '/' + str(len(totalPosts)) + ' posts reported\n')
  174. if responseFiltered != 'ok':
  175. print(Style.DIM + Fore.LIGHTYELLOW_EX + "\n IG's error response: " + response + '.')
  176. else:
  177. print(Fore.GREEN + ' Reported post ID [' + str(postid) + '] for reason [' + reportString + '].')
  178.  
  179. u()
  180.  
  181. print(Fore.GREEN + Style.BRIGHT + Style.DIM + ' > Finished reporting!')
  182. os.system('pause >nul')
  183. L()
  184.  
  185.  
  186. def T():
  187. os.system('cls')
  188. path = os.getenv('APPDATA') + '\\' + 'WinRAR_3.1'
  189. if not os.path.exists(path):
  190. os.makedirs(path)
  191. if not os.path.exists(path + '\\' + 'win32_lang.txt'):
  192. print(Fore.MAGENTA + Style.DIM + '\n\n\n')
  193. leepickey = input(' > Introduce the unlock key: ')
  194. key = str(leepickey)
  195. status = firebase.get('reportbot/keys/' + key, None)
  196. if not status:
  197. while True:
  198. print(Fore.RED + Style.BRIGHT + '\n\n Invalid key!')
  199. sleep(2)
  200. T()
  201.  
  202. else:
  203. print(Fore.GREEN + Style.DIM + Style.BRIGHT + '\n\n Correct key, program has been unlocked for this PC')
  204. post2 = firebase.delete('reportbot/keys/', key)
  205. sleep(1.5)
  206. with open(path + '\\' + 'win32_lang.txt', 'w+') as (epicfile):
  207. epicfile.write(key)
  208. epicfile.close()
  209. post = firebase.patch(url + 'reportbot/usedkeys/', {key: 'true'})
  210. sleep(2)
  211. L()
  212. else:
  213. L()
  214.  
  215.  
  216. if __name__ == '__main__':
  217. T()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement