L

regpagevitri

public
lamdayne1 Aug 07, 2024 Never 70
Clone
Python regpagevitri 171 lines (163 loc) | 6.92 KB
1
try:import requests
2
except:import os;os.system('pip install requests')
3
from datetime import datetime
4
import requests,sys,time,os,random,re
5
from pystyle import Write,Colors
6
import base64, requests, json
7
from time import sleep
8
from pystyle import *
9
#==Màu==#
10
do = "\033[1;91m"
11
xanhbien = "\033[1;36m"
12
vang = "\033[0;33m"
13
hong = "\033[1;35m"
14
xanhduong = "\033[1;20m"
15
xanhla = "\033[1;32m"
16
xanh="\033[1;32m"
17
cam="\033[1;33m"
18
blue="\033[1;20m"
19
lam="\033[1;20m"
20
tim="\033[1;20m"
21
syan="\033[1;36m"
22
xnhac= "\033[1;96m"
23
den="\033[1;90m"
24
luc="\033[1;92m"
25
xduong="\033[1;94m"
26
trang="\033[1;97m"
27
den = "\033[1;90m"
28
luc = "\033[1;32m"
29
trang = "\033[1;37m"
30
red = "\033[1;31m"
31
do = "\033[1;31m"
32
vang = "\033[1;33m"
33
tim = "\033[1;35m"
34
lamd = "\033[1;20m"
35
lam = "\033[1;36m"
36
tim = "\033[35m"
37
hong = "\033[1;95m"
38
39
def EAAG(cookie, fa):
40
head = {
41
"Host":"business.facebook.com",
42
"upgrade-insecure-requests":"1",
43
"user-agent":"Mozilla/5.0 (Linux; Android 12; SM-bA217F Build/SP1A.210812.016;) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/106.0.5249.79 Mobile Safari/537.36",
44
"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
45
"dnt":"1",
46
"x-requested-with":"mark.via.gp",
47
"sec-fetch-site":"none",
48
"sec-fetch-mode":"navigate",
49
"sec-fetch-user":"?1",
50
"sec-fetch-dest":"document",
51
"accept-encoding":"gzip, deflate",
52
"accept-language":"vi-VN,vi;q=0.9,en-US;q=0.8,en;q=0.7",
53
"cookie":cookie,
54
}
55
access = requests.get("https://business.facebook.com/content_management", headers=head).text
56
try:
57
token = "EAAG"+access.split('EAAG')[1].split('"')[0]
58
return token
59
except:
60
id = cookie.split("c_user=")[1].split(";")[0]
61
fa = fa.replace(" ", "")
62
code = requests.get("http://2fa.live/tok/"+fa).json["token"]
63
hs = access.split('"haste_session":"')[1].split('"')[0]
64
rev = access.split('"server_revision":')[1].split('"')[0]
65
hsi = access.split('"hsi":"')[1].split('"')[0]
66
fb_dtsg = access.split('["DTSGInitialData",[],{"token":"')[1].split('"')[0]
67
lsd = access.split('"LSD",[],{"token":"')[1].split('"')[0]
68
r = access.split('"__spin_r":')[1].split(',')[0]
69
t = access.split('"__spin_t":')[1].split(',')[0]
70
data ={
71
"approvals_code":code,
72
"save_device":"false",
73
"__user":id,
74
"__a":"1",
75
"__dyn":"7xeUmF3EfXpUS2q3mbwyyVuC2-m2q3Kq2i5U4e1Fx-ewSxu68uxa2e1Ezobo9E98dEO0G8G6Ehw9-15wfO1YCwjHwuk9wgovyolwuEsxe687C2m3K2y1nUS0jG12KdwnU5W0IU9kbxR12ewi85W1bxq1uG3G48comy84CfxW4U28wdq1iwmEiwuU5Wu0FUkyFo158ixe9zUdEGdwzwea0Lo4K2e1Fwba9w",
76
"__csr":"",
77
"__req":"8",
78
"__hs":hs,
79
"dpr":"2",
80
"__ccg":"EXCELLENT",
81
"__rev":rev,
82
"__s":"3z6ci8%3Ar5okmm%3As2km74",
83
"__hsi":hsi,
84
"__comet_req":"0",
85
"fb_dtsg":fb_dtsg,
86
"jazoest":"25716",
87
"lsd":lsd,
88
"__aaid":"5294291090639440",
89
"__spin_r":r,
90
"__spin_b":"trunk",
91
"__spin_t":t,
92
"__jssesw":"1"
93
}
94
head = {
95
"Host":"business.facebook.com",
96
"x-fb-lsd":lsd,
97
"user-agent":"Mozilla/5.0 (Linux; Android 12; SM-A217F Build/SP1A.210812.016;) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/106.0.5249.79 Mobile Safari/537.36",
98
"content-type":"application/x-www-form-urlencoded",
99
"accept":"*/*",
100
"origin":"https://business.facebook.com",
101
"x-requested-with":"mark.via.gp",
102
"sec-fetch-site":"same-origin",
103
"sec-fetch-mode":"cors",
104
"sec-fetch-dest":"empty",
105
"referer":"https://business.facebook.com/security/twofactor/reauth/?twofac_next=https%3A%2F%2Fbusiness.facebook.com%2Fcontent_management&type=avoid_bypass&app_id=0&save_device=0",
106
"accept-encoding":"gzip, deflate",
107
"accept-language":"vi-VN,vi;q=0.9,en-US;q=0.8,en;q=0.7",
108
"cookie":cookie
109
}
110
access = requests.post("https://business.facebook.com/security/twofactor/reauth/enter/", headers=head, data=data).text
111
access = requests.get("https://business.facebook.com/content_management", headers=head).text
112
try:
113
token = "EAAG"+access.split('EAAG')[1].split('"')[0]
114
return token
115
except:
116
return "'die'"
117
118
119
def idelay(o):
120
while(o>0):
121
o=o-1
122
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XX......{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
123
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XXX.....{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
124
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XXXX....{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
125
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XXXXX...{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
126
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XXXXXX..{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
127
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XXXXXXX.{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
128
print(f'{trang}[{do}FRIVE{trang}][{xanhbien}XXXXXXXX{trang}][{vang}{o}{trang}]',' ',end='\r');sleep(1/6)
129
130
os.system("cls" if os.name == "nt" else "clear")
131
list_token_page=[]
132
list_id_page=[]
133
token_s=1
134
ckk=input(f'{luc}NHẬP COOKIE FACEBOOK{trang}: ')
135
h_fa=input(f'{luc}NHẬP 2FA(NẾU CÓ){trang}: ')
136
cookie=ckk
137
fa=h_fa
138
Access = EAAG(cookie, fa)
139
if "'die'" in Access:
140
print("die")
141
else:
142
token = Access
143
print('token live'.upper())
144
145
id_page=input(f'{luc}NHẬP ID PAGE MẸ{trang}: ')
146
147
head = {
148
"cookie":ckk
149
}
150
get_token_page=requests.get('https://graph.facebook.com/v3.1/'+id_page+'?fields=access_token,name&access_token='+token,headers=head).json()
151
152
if 'access_token' in get_token_page:
153
token_page=get_token_page["access_token"]
154
ten=get_token_page["name"]
155
elif 'error' in get_token_page:print(get_token_page['error']['message'])
156
else:print(get_token_page)
157
delay=int(input(f'{luc}NHẬP DELAY{trang}: '))
158
dem=0
159
160
while(True):
161
latitude=random.randrange(9999)
162
longitude=random.randrange(3333)
163
store_number=random.randrange(999)
164
name=requests.get('https://story-shack-cdn-v2.glitch.me/generators/vietnamese-name-generator/female?count=2').json()['data'][0]['name']
165
data={'_reqName': 'object:page/locations','_reqSrc': 'LocationManagerUtils','always_open': 'false','differently_open_offerings': '{}','id': id_page,'ignore_warnings': 'true','is_franchise': 'false','locale': 'vi_VN','location': '{"city_id":2599270,"latitude":"21.'+str(latitude)+'","longitude":"105.2'+str(longitude)+'","street":"'+name+'","zip":"10000"}','method': 'post','permanently_closed': 'false','phone': '+84395581887','pickup_options': '[]','place_topics': '["123377808095874","530553733821238"]','pretty': '0','price_range': 'Unspecified','store_name': name,'store_number': store_number,'suppress_http_code': '1'}
166
reg=requests.post(f'https://graph.facebook.com/v12.0/{id_page}/locations?access_token={token_page}',data=data,headers=head).json()
167
id = reg["id"]
168
gio = datetime.now().strftime("%H:%M:%S")
169
dem+=1
170
print(f"{trang}[{vang}{dem}{trang}] | {trang}[{vang}{gio}{trang}] | {luc}UID: {vang}{id} {trang}| {luc}NAME: {vang}{name}")
171
idelay(delay)