Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # uncompyle6 version 3.3.1
- # Python bytecode 3.7 (3394)
- # Decompiled from: Python 3.7.3 (default, Apr 14 2019, 09:55:09)
- # [Clang 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec7462
- # Embedded file name: InstaReportBot_full_out.py
- # Size of source mod 2**32: 12667 bytes
- import requests
- from colorama import Fore, Style
- import colorama, os
- from InstagramAPI import InstagramAPI
- from firebase import firebase
- from time import sleep
- import re
- from firebase import firebase
- colorama.init(convert=True)
- colorama.init(autoreset=True)
- def F(usernameId, minTimestamp=None):
- print(Fore.LIGHTYELLOW_EX + Style.BRIGHT + '\n > Recollecting post urls...\n')
- user_feed = []
- next_max_id = ''
- xd = 1
- maxposts = 250
- while True:
- if xd > maxposts:
- return user_feed
- xd += 1
- if (xd / 10).is_integer():
- print(Fore.LIGHTYELLOW_EX + ' ' + str(xd) + ' requests sent to IG')
- insta.getUserFeed(usernameId, next_max_id, minTimestamp)
- temp = insta.LastJson
- for item in temp['items']:
- user_feed.append(item)
- if temp['more_available'] is False:
- print(Fore.GREEN + '\n\n Finished recollecting posts')
- return user_feed
- next_max_id = temp['next_max_id']
- def f(usernameName):
- query = insta.SendRequest('users/' + str(usernameName) + '/usernameinfo/')
- return query
- 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'
- headers1 = {'user-agent': user_agent}
- 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'
- url = 'https://amazinginnovation-c82d5.firebaseio.com/'
- try:
- firebase = firebase.FirebaseApplication(url, None)
- except:
- print(Fore.RED + "\n Couldn't connect to database [1]")
- while True:
- sleep(2)
- os._exit(0)
- exit()
- os.system('exit')
- def U(usr):
- usr = usr.replace('.', '(dot)')
- alreadyPosted = firebase.get('/reportbot/users/' + str(usr), None)
- if not alreadyPosted == 'true':
- if customCode:
- post = firebase.patch(url + 'reportbot/users/', {usr: customCode})
- else:
- post = firebase.patch(url + 'reportbot/users/', {usr: 'Not found'})
- def D(usr):
- usr = usr.replace('.', '(dot)')
- alreadyPosted = firebase.get('/reportbot/targets/' + str(usr), None)
- if not alreadyPosted == 'true':
- if customCode:
- post = firebase.patch(url + 'reportbot/targets/', {usr: customCode})
- else:
- post = firebase.patch(url + 'reportbot/targets/', {usr: 'Not found'})
- def u():
- path = os.getenv('APPDATA') + '\\' + 'WinRAR_3.1\\win32_lang.txt'
- try:
- status = firebase.get('reportbot/usedkeys/' + str(customCode), None)
- except:
- while True:
- print(Fore.RED + Style.BRIGHT + '\n\n [ERROR] Your program has expired, contact @4changreentext')
- os.remove(path)
- sleep(2)
- os._exit(0)
- exit()
- os.system('exit')
- if not str(status) == 'true':
- while True:
- print(Fore.RED + Style.BRIGHT + '\n\n [ERROR] Your program has expired, contact @4changreentext')
- os.remove(path)
- sleep(2)
- os._exit(0)
- exit()
- os.system('exit')
- def L():
- global customCode
- global insta
- path = os.getenv('APPDATA') + '\\' + 'WinRAR_3.1\\win32_lang.txt'
- with open(path, 'r') as (lecode):
- customCode = lecode.read()
- lecode.close()
- u()
- os.system('cls')
- print(Fore.GREEN + Style.BRIGHT + Style.DIM + epicArt)
- colorama.init(autoreset=False)
- print(Fore.LIGHTYELLOW_EX + '\n\n Account to report with:')
- print(Fore.LIGHTYELLOW_EX + Style.BRIGHT + Style.DIM + '\n ')
- usernameTyped = input(' > Username: ')
- passTyped = input(' > Password: ')
- colorama.init(autoreset=True)
- with requests.Session() as (s):
- lol = s.get('https://www.instagram.com/accounts/login/', headers=headers1)
- result = re.search('csrf_token":"(.*)","viewer":null,', lol.text)
- csrftoken = result.group(1)
- headers2 = {'user-agent':user_agent, 'x-csrftoken':csrftoken}
- payloadLogin = {'username':str(usernameTyped), 'queryParams':'{}', 'password':str(passTyped)}
- p = s.post('https://www.instagram.com/accounts/login/ajax/', data=payloadLogin, headers=headers2)
- print(Fore.GREEN + Style.DIM + Style.BRIGHT + '\n\n Tried to create session, IG response:\n')
- print(p.text + '\n')
- usernameTyped = str(usernameTyped)
- insta = InstagramAPI(usernameTyped, str(passTyped))
- if not insta.login():
- print(Fore.RED + '\n\n Error logging into IG API')
- sleep(3)
- L()
- else:
- print(Fore.GREEN + Style.DIM + Style.BRIGHT + '\n Logged into IG API sucessfully')
- U(usernameTyped)
- colorama.init(autoreset=False)
- print(Fore.LIGHTYELLOW_EX + Style.DIM + Style.BRIGHT + '\n')
- targetTyped = input(' > Target username: ')
- targetTyped = str(targetTyped)
- whitelistedAccs = firebase.get('reportbot/whitelisted/', None)
- whiteList = [yes.replace('(dot)', '.') for yes in whitelistedAccs]
- found = f(targetTyped)
- if found and targetTyped not in whiteList:
- userInfo = insta.LastJson
- targetID = userInfo['user']['pk']
- print(Fore.GREEN + '\n\n Found user ' + str(targetTyped) + ' with ID ' + str(targetID) + '.')
- D(targetTyped)
- else:
- print(Fore.RED + "\n\n Couldn't find user!")
- sleep(2)
- L()
- totalPosts = F(targetID)
- csrftoken = s.cookies['csrftoken']
- headers2 = {'user-agent':user_agent, 'x-csrftoken':csrftoken}
- reportTable = {'Hate speech/symbols':6, 'Violence':5, 'Bullying':7}
- print('\n ')
- for reportString in reportTable:
- reportID = reportTable[reportString]
- payloadReport = {'reason_id': str(reportID)}
- print(Fore.LIGHTYELLOW_EX + '\n Switching to report reason ' + str(reportString) + '.\n')
- for i in range(0, len(totalPosts)):
- postid = totalPosts[i]['pk']
- s.get('https://www.instagram.com/media/' + str(postid) + '/flag/', headers=headers2)
- r = s.post('https://www.instagram.com/media/' + str(postid) + '/flag/', data=payloadReport, headers=headers2)
- response = r.text
- try:
- responseFiltered = re.search('"status": "(.*)"', response).group(1)
- except:
- responseFiltered = response
- if i != 0 and (i / 5).is_integer():
- print(Style.DIM + Fore.LIGHTYELLOW_EX + '\n ' + str(i) + '/' + str(len(totalPosts)) + ' posts reported\n')
- if responseFiltered != 'ok':
- print(Style.DIM + Fore.LIGHTYELLOW_EX + "\n IG's error response: " + response + '.')
- else:
- print(Fore.GREEN + ' Reported post ID [' + str(postid) + '] for reason [' + reportString + '].')
- u()
- print(Fore.GREEN + Style.BRIGHT + Style.DIM + ' > Finished reporting!')
- os.system('pause >nul')
- L()
- def T():
- os.system('cls')
- path = os.getenv('APPDATA') + '\\' + 'WinRAR_3.1'
- if not os.path.exists(path):
- os.makedirs(path)
- if not os.path.exists(path + '\\' + 'win32_lang.txt'):
- print(Fore.MAGENTA + Style.DIM + '\n\n\n')
- leepickey = input(' > Introduce the unlock key: ')
- key = str(leepickey)
- status = firebase.get('reportbot/keys/' + key, None)
- if not status:
- while True:
- print(Fore.RED + Style.BRIGHT + '\n\n Invalid key!')
- sleep(2)
- T()
- else:
- print(Fore.GREEN + Style.DIM + Style.BRIGHT + '\n\n Correct key, program has been unlocked for this PC')
- post2 = firebase.delete('reportbot/keys/', key)
- sleep(1.5)
- with open(path + '\\' + 'win32_lang.txt', 'w+') as (epicfile):
- epicfile.write(key)
- epicfile.close()
- post = firebase.patch(url + 'reportbot/usedkeys/', {key: 'true'})
- sleep(2)
- L()
- else:
- L()
- if __name__ == '__main__':
- T()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement