Advertisement
OBF-XIn

116.206.9.54-/sdcard/login.py.py

Jan 24th, 2023
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.63 KB | None | 0 0
  1. import os,sys,requests,re
  2.  
  3. def menu():
  4.     print(f"""[01] Login Cookie V1\n[02] Login Cookie V2\n[03] Login Cookie V3""")
  5.     menu = input('\n[?] Pilih : ')
  6.     if menu in ['1']:
  7.         os.system('rm -rf .token.txt')
  8.         os.system('rm -rf .cok.txt')
  9.         token1()
  10.     elif menu in ['2']:
  11.         os.system('rm -rf .token.txt')
  12.         os.system('rm -rf .cok.txt')
  13.         token2()
  14.     elif menu in ['3']:
  15.         os.system('rm -rf .token.txt')
  16.         os.system('rm -rf cok.txt')
  17.         token3()
  18.     else:
  19.         exit()
  20.  
  21. def token1():
  22.     try:
  23.         ses = requests.Session()
  24.         cookie = input('\n[?] MASUKAN COOKIE : ')
  25.         cookies = {'cookie':cookie}
  26.         url = 'https://www.facebook.com/adsmanager/manage/campaigns'
  27.         req = ses.get(url,cookies=cookies)
  28.         set = re.search('act=(.*?)&nav_source',str(req.content)).group(1)
  29.         nek = '%s?act=%s&nav_source=no_referrer'%(url,set)
  30.         roq = ses.get(nek,cookies=cookies)
  31.         tok = re.search('accessToken="(.*?)"',str(roq.content)).group(1)
  32.         tokenw = open(".token.txt", "w").write(tok)
  33.         cokiew = open(".cok.txt", "w").write(cookie)
  34.         print('[✓] LOGIN BERHASIL')
  35.         os.system('python runx.py')
  36.     except Exception as e:
  37.         os.system('rm -rf .cok.txt && rm -rf .tok.txt')
  38.         print(e)
  39.         exit()
  40.  
  41.  
  42. def token2():
  43.     try:
  44.         ses = requests.Session()
  45.         print(f' LOGIN COKIE V2')
  46.         cookie = input('\n[?] Cookie : ')
  47.         cookies = {'cookie':cookie}
  48.         url = 'https://www.facebook.com/adsmanager/manage/campaigns'
  49.         req = ses.get(url,cookies=cookies)
  50.         set = re.search('act=(.*?)&nav_source',str(req.content)).group(1)
  51.         nek = '%s?act=%s&nav_source=no_referrer'%(url,set)
  52.         roq = ses.get(nek,cookies=cookies)
  53.         tok = re.search('accessToken="(.*?)"',str(roq.content)).group(1)
  54.         tokenw = open(".token.txt", "w").write(tok)
  55.         cokiew = open(".cok.txt", "w").write(cookie)
  56.         os.system('python runx.py')
  57.     except Exception as e:
  58.         os.system('rm -rf c.txt && rm -rf t.txt')
  59.         print(e)
  60.         exit()
  61.  
  62. def token3():
  63.     try:
  64.         ses = requests.Session()
  65.         print(f'LOGIN COOKIE V3')
  66.         cookie = input('\nCOKIE : ')
  67.         cookies = {'cookie':cookie}
  68.         url = 'https://www.facebook.com/adsmanager/manage/campaigns'
  69.         req = ses.get(url,cookies=cookies)
  70.         set = re.search('act=(.*?)&nav_source',str(req.content)).group(1)
  71.         nek = '%s?act=%s&nav_source=no_referrer'%(url,set)
  72.         roq = ses.get(nek,cookies=cookies)
  73.         tok = re.search('accessToken="(.*?)"',str(roq.content)).group(1)
  74.         tokenw = open("token.txt", "w").write(tok)
  75.         cokiew = open("cok.txt", "w").write(cookie)
  76.         os.system('python runx.py')
  77.         #print('\nLogin Berhasil , file tersimpan di token.txt & cok.txt')
  78.     except Exception as e:
  79.         os.system('rm -rf cok.txt && rm -rf token.txt')
  80.         print(e)
  81.         exit()
  82.  
  83. if __name__=='__main__':
  84.     try:os.mkdir('OK')
  85.     except:pass
  86.     try:os.mkdir('CP')
  87.     except:pass
  88.     os.system('clear')
  89.     menu()
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement