Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests, json, re, os
- from rich.panel import Panel
- from rich.console import Console
- from rich.columns import Columns
- class Token:
- def __init__(self) -> None:
- pass
- def Token_Eaab(self):
- os.system('clear')
- Console(width = 65, style = "bold grey50").print(Panel(f"[italic white]Silakan Masukan Cookie Facebook, Pastikan Akun Tidak Limite!", subtitle = "╭─────", subtitle_align = "left"))
- cok = Console().input("[bold grey50] ╰─> ")
- with requests.Session() as r:
- try:
- cur = r.get('https://adsmanager.facebook.com/adsmanager/manage/campaigns?&breakdown_regrouping=1',cookies={'cookie': cok}).text
- src = re.findall('act=(\d+)',cur)[0]
- with requests.Session() as r:
- try:
- act = r.get(f"https://adsmanager.facebook.com/adsmanager/manage/campaigns?act={src}&breakdown_regrouping=1",cookies={'cookie': cok}).text
- tok = re.search('.__accessToken="(.*?)"',act).group(1)
- Console().print(f"[bold grey50] ╰─> {tok}")
- with open('.data_fb.txt',mode='w') as wr:
- wr.write(f'{cok}|{tok}')
- wr.close()
- Console().print(f"[bold grey50] ╰─> Jalankan Ulang Perintahnya!, Python Run.py")
- exit()
- except (requests.exceptions.ConnectionError) as e:
- Console(width = 65, style = "bold grey50").print(Panel(f"[italic red]{str(e).title()}!", title = "[bold red]>[bold yellow]>[bold green]>[bold grey50] (Error) [bold green]<[bold yellow]<[bold red]<"))
- exit()
- except (IndexError, AttributeError) as e:
- Console(width = 65, style = "bold grey50").print(Panel(f"[italic red]Opss, Cookie Exspired Silakan Ganti Tumbal Di Sarankan Membuat Akun Baru!", title = "[bold red]>[bold yellow]>[bold green]>[bold grey50] (Error) [bold green]<[bold yellow]<[bold red]<"))
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement