L

tdsfb

public
lamdayne1 Aug 07, 2024 Never 34
Clone
Python tds 1937 lines (928 loc) | 50.87 KB
1
import os, json, sys, requests
2
from sys import platform
3
4
from time import sleep
5
6
from datetime import datetime
7
8
from random import randint
9
10
from pystyle import Colors, Colorate
11
12
import uuid, re
13
14
from bs4 import BeautifulSoup
15
16
def banner():
17
18
os.system("cls" if os.name == "nt" else "clear")
19
20
banner = f"""
21
\033[1;34m╔══════════════════════════════════════════════════════════════════════╗
22
\033[38;2;0;0;255m █████╗ ███████╗ ██████╗██╗██╗ \033[0m
23
\033[38;2;50;50;255m ██╔══██╗██╔════╝██╔════╝██║██║ \033[0m
24
\033[38;2;100;100;255m ███████║███████╗██║ ██║██║ \033[0m
25
\033[38;2;150;150;255m ██╔══██║╚════██║██║ ██║██║ \033[0m
26
\033[38;2;200;200;255m ██║ ██║███████║╚██████╗██║██║ \033[0m
27
\033[38;2;255;255;255m ╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝╚═╝ \033[0m
28
29
\033[1;34m╠══════════════════════════════════════════════════════════════════════╣
30
\033[1;32m║➢ Author : 🤖ASCII🤖 ║
31
\033[1;36m║➢ Youtube : https://www.youtube.com/@ASCII303 ║
32
\033[1;31m║➣ Support : t.me/Lamdayne1 ║
33
\033[1;33m║➣ Group Tele Hỗ Trợ : https://t.me/asciiforest ║
34
\033[1;34m╚══════════════════════════════════════════════════════════════════════╝
35
"""
36
37
for X in banner:
38
39
sys.stdout.write(X)
40
41
sys.stdout.flush()
42
43
sleep(0.00)
44
45
class Facebook_Api (object):
46
47
def __init__(self, cookie):
48
49
self.cookie = cookie
50
51
self.user_id = cookie.split('c_user=')[1].split(';')[0]
52
53
self.headers = {'authority': 'mbasic.facebook.com','cache-control': 'max-age=0','sec-ch-ua': '"Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"','sec-ch-ua-mobile': '?0','sec-ch-ua-platform': '"Windows"','upgrade-insecure-requests': '1','origin': 'https://mbasic.facebook.com','content-type': 'application/x-www-form-urlencoded','user-agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36','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','sec-fetch-site': 'same-origin','sec-fetch-mode': 'navigate','sec-fetch-user': '?1','sec-fetch-dest': 'document','referer': 'https://mbasic.facebook.com/','accept-language': 'en-US,en;q=0.9','cookie': cookie}
54
55
56
57
def get_thongtin(self):
58
59
try:
60
61
#if True:
62
63
#url = requests.get('https://mbasic.facebook.com/profile.php',headers=self.headers).url
64
65
home = requests.get('https://mbasic.facebook.com/profile.php',headers=self.headers).text
66
67
self.fb_dtsg = home.split('<input type="hidden" name="fb_dtsg" value="')[1].split('"')[0]
68
69
self.jazoest = home.split('<input type="hidden" name="jazoest" value="')[1].split('"')[0]
70
71
ten = home.split('<title>')[1].split('</title>')[0]
72
73
self.user_id = self.cookie.split('c_user=')[1].split(';')[0]
74
75
#print(f'{luc}Tên Facebook: {vang}{ten} {red}| {luc}ID: {vang}{self.user_id} ')
76
77
#print(f'{ten} | {self.user_id} ')
78
79
return ten, self.user_id
80
81
except:
82
83
return 0
84
85
86
87
88
89
def follow(self, id):
90
91
data = {'av':self.user_id,'__user':self.user_id,'__a':'1','__dyn':'7AzHxqUW13xt0mUyEqxenFwLBwopU98nwgU765QdwSxucyU8EW1twYwJyEiwsobo6u3y4o11U2nwb-q7oc81xoswIK1Rwwwg8a8465o-cwfG12wOKdwGxu782lwv89kbxS2218wc61uwZwlo5qfK0zEkxe2GewyDwsoqBwJK2W5olwUwgojUlDw-wSU72m7-8wywdG7FobpEbUGdwb6223908O3216AzUjwTwNxe6Uak1xwJwxw','__csr':'hcp2vsTfcyBblX4JmmZOiFYKx7KWi_qT9jkxbOfKAAlXWmHGGlq8kNsOVanp9WDQKEHXKRWGulGhaAHHy8VeiWGuUGVoyQUFaui54cCHpp-WCxqHyV9qyUx153qzoWE8ql3pEG4p8pyVGCyooCxe5ojBy98aHG4Eb8mG269Vby8be4oGUO9whXxa2q2q49okyoy26q1BwYxe4E6W10y88E467Erzo6-2y5Etxl3UO2GWwaeu3-7o7uaw922t08K026O03iuC04f802PRw4bw2v80za0G80B-0b-e09dBw0Uww2DOw0jP80n7g3Iw1k208bzE1lU8E','__req':'5','__hs':'9362.HYP:comet_pkg.2.1.0.2.1','dpr':'2','__ccg':'GOOD','__rev':'1006788684','__s':'p2x8mf:qj6dvy:bj8e46','__hsi':'7185171904183015509','__comet_req':'15','fb_dtsg':self.fb_dtsg,'jazoest':self.jazoest,'lsd':'afdisHHGuglOo_hNSDt3Fb','__aaid':'775223720487728','__spin_r':'1006788684','__spin_b':'trunk','__spin_t':'1672928199','fb_api_caller_class':'RelayModern','fb_api_req_friendly_name':'CometUserFollowMutation','variables':'{"input":{"attribution_id_v2":"ProfileCometTimelineListViewRoot.react,comet.profile.timeline.list,via_cold_start,1672928202199,140922,190055527696468,","subscribe_location":"PROFILE","subscribee_id":"'+id+'","actor_id":"'+self.user_id+'","client_mutation_id":"1"},"scale":2}','server_timestamps':'true','doc_id':'5032256523527306',}
92
93
headers = {"Host": "www.facebook.com","sec-ch-ua": "\"Chromium\";v\u003d\"107\", \"Not\u003dA?Brand\";v\u003d\"24\"","sec-ch-ua-mobile": "?0","user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","viewport-width": "980","content-type": "application/x-www-form-urlencoded","x-fb-lsd": "afdisHHGuglOo_hNSDt3Fb","x-fb-friendly-name": "CometUserFollowMutation","sec-ch-prefers-color-scheme": "dark","sec-ch-ua-platform": "\"Linux\"","accept": "*/*","origin": "https://www.facebook.com","sec-fetch-site": "same-origin","sec-fetch-mode": "cors","sec-fetch-dest": "empty","referer": "https://www.facebook.com/"+id,"accept-language": "vi-VN,vi;q\u003d0.9,fr-FR;q\u003d0.8,fr;q\u003d0.7,en-US;q\u003d0.6,en;q\u003d0.5","cookie":self.cookie}
94
95
try:
96
97
fl = requests.post('https://www.facebook.com/api/graphql/',headers=headers, data=data)
98
99
if 'IS_SUBSCRIBED' in fl.text:
100
101
return True
102
103
else:
104
105
return fl
106
107
except:
108
109
return False
110
111
112
113
def page(self,id):
114
115
data = {'av':self.user_id,'__user':self.user_id,'__a':'1','__dyn':'7AzHxqU5a5Q1ryaxG4VuC0BVU98nwgU765QdwSwAyU8EW0CEboG4E762S1DwUx60gu0BU2_CxS320om78bbwto88422y11xmfz83WwgEcHzoaEnxO0Bo7O2l2Utwwwi831wiEjwZwlo5qfK0zEkxe2GewGwkUtxGm2SUbElxm3y11xfxmu3W2i4U72m7-8wywfCm2Sq2-azo2NwwwOg2cwMwhF8-4UdUcojxK2B0oobo8o','__csr':'g8JNc9n2tWr5W4til-I_On8J9rshlR8nZFiELH_Hnij4JfOJLOGiLoxLBlGRuZaGF4CZddQ4L_JfCiDKWVryuiqqFAcy8x6CBtqJkF8ZVExauAbgOtLAG5FUGFptxqfxi4Hzaz8CQ2SaxC9xCi48Wqqq11g8EaoS9g9U4m224oG68sGucx68wyg6G22mfxa4Xxq7EKbwi82LwNxu48c814EC2K3O5U-2WEhCxO1EwioeUiwiE6e3HwTw18C02k-0exw0deO0jV05Swe20bTw5_w1zF03I202po6e07Co0K6Zlw0jjo0E-0qW08ug8UhBw21e0fLw5Ww9K0Z86u','__req':'o','__hs':'19363.HYP:comet_pkg.2.1.0.2.1','dpr':'2','__ccg':'GOOD','__rev':'1006793331','__s':'v80lqo:poayhk:qxdcmk','__hsi':'7185553908092803679','__comet_req':'15','fb_dtsg':self.fb_dtsg,'jazoest':self.jazoest,'lsd':'V64c7kKr5hAtzX2IIDgKp8','__aaid':'775223720487728','__spin_r':'1006793331','__spin_b':'trunk','__spin_t':'1673017141','fb_api_caller_class':'RelayModern','fb_api_req_friendly_name':'CometPageLikeCommitMutation','variables':'{"input":{"attribution_id_v2":"CometSinglePageHomeRoot.react,comet.page,via_cold_start,1673017144344,576155,250100865708545,","is_tracking_encrypted":true,"page_id":"'+id+'","source":"unknown","tracking":[],"actor_id":"'+self.user_id+'","client_mutation_id":"1"},"isAdminView":false}','server_timestamps':'true','doc_id':'5491200487600992',}
116
117
headers = {"Host": "www.facebook.com","sec-ch-ua": "\"Chromium\";v\u003d\"107\", \"Not\u003dA?Brand\";v\u003d\"24\"","sec-ch-ua-mobile": "?0","user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36","viewport-width": "980","content-type": "application/x-www-form-urlencoded","x-fb-lsd": "V64c7kKr5hAtzX2IIDgKp8","x-fb-friendly-name": "CometPageLikeCommitMutation","sec-ch-prefers-color-scheme": "dark","sec-ch-ua-platform": "\"Linux\"","accept": "*/*","origin": "https://www.facebook.com","sec-fetch-site": "same-origin","sec-fetch-mode": "cors","sec-fetch-dest": "empty","referer": "https://www.facebook.com/"+id,"accept-language": "vi-VN,vi;q\u003d0.9,fr-FR;q\u003d0.8,fr;q\u003d0.7,en-US;q\u003d0.6,en;q\u003d0.5","cookie":self.cookie}
118
119
try:
120
121
page = requests.post('https://www.facebook.com/api/graphql/',headers=headers, data=data)
122
123
if 'FOLLOW' in page.text:
124
125
return True
126
127
else:
128
129
return page.text
130
131
except:
132
133
return False
134
135
136
137
def group(self, id):
138
139
headers = {"Host": "www.facebook.com","sec-ch-ua": "\"Not?A_Brand\";v\u003d\"8\", \"Chromium\";v\u003d\"108\", \"Google Chrome\";v\u003d\"108\"","sec-ch-ua-mobile": "?0","user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36","viewport-width": "980","content-type": "application/x-www-form-urlencoded","x-fb-lsd": "gKT7R4dxIBjI4wUDUP5ivT","x-fb-friendly-name": "GroupCometJoinForumMutation","sec-ch-prefers-color-scheme": "dark","sec-ch-ua-platform": "\"Linux\"","accept": "*/*","origin": "https://www.facebook.com","sec-fetch-site": "same-origin","sec-fetch-mode": "cors","sec-fetch-dest": "empty","referer": "https://www.facebook.com/groups/"+id+"/","accept-language": "vi-VN,vi;q\u003d0.9,fr-FR;q\u003d0.8,fr;q\u003d0.7,en-US;q\u003d0.6,en;q\u003d0.5","cookie":self.cookie}
140
141
data = {'av':self.user_id,'__user':self.user_id,'__a':'1','__dyn':'7AzHJ16U9ob8ng5K8G6EjBWo2nDwAxu13wsongS3q2ibwyzE2qwJyEiwsobo6u3y4o2Gwfi0LVEtwMw65xO321Rwwwg8a8465o-cwfG12wOKdwGxu782lwv89kbxS2218wc61axe3S1lwlE-U2exi4UaEW2G1jxS6FobrwKxm5oe8464-5pUfEe88o4Wm7-8xmcwfCm2CVEbUGdG1Fwh888cA0z8c84qifxe3u364UrwFg662S26','__csr':'gadNAIYllhsKOE8IpidFPhcIx34Omy9-O9OO8hZ_8-kAymHGAybJqGlvmWl7nWBWJ7GqaXHz7GFe9oy_KBl7h6h4KVah94QeKVHACDyryqKdF5GuXXBCgNpbJ5jjGm8yQEWrCixl6xWuiih5yo-8wAy84mq4poN0Vzbxe16whAufgO5U8UKi4Eyu4EjwGK78527o8411wgocU5u1MwSwFyU8Uf8igaElw8e9xK2GewNgy5o5m1nDwLwrokm16www8G03cy0arw0Zyw0aaC0mG0eJzl8ow2Jw6tw44w4uzo045W1UgSeg0z-07X81-E0cNo0By1Wwi8fE0lYw2h81a8gw9u','__req':'k','__hs':'19363.HYP:comet_pkg.2.1.0.2.1','dpr':'2','__ccg':'EXCELLENT','__rev':'1006794317','__s':'gtlvj8:fxbzro:f2kk19','__hsi':'7185658639628512803','__comet_req':'15','fb_dtsg':self.fb_dtsg,'jazoest':self.jazoest,'lsd':'gKT7R4dxIBjI4wUDUP5ivT','__aaid':'1576489885859472','__spin_r':'1006794317','__spin_b':'trunk','__spin_t':'1673041526','fb_api_caller_class':'RelayModern','fb_api_req_friendly_name':'GroupCometJoinForumMutation','variables':'{"feedType":"DISCUSSION","groupID":"'+id+'","imageMediaType":"image/x-auto","input":{"action_source":"GROUP_MALL","attribution_id_v2":"CometGroupDiscussionRoot.react,comet.group,via_cold_start,1673041528761,114928,2361831622,","group_id":"'+id+'","group_share_tracking_params":{"app_id":"2220391788200892","exp_id":"null","is_from_share":false},"actor_id":"'+self.user_id+'","client_mutation_id":"1"},"inviteShortLinkKey":null,"isChainingRecommendationUnit":false,"isEntityMenu":true,"scale":2,"source":"GROUP_MALL","renderLocation":"group_mall","__relay_internal__pv__GroupsCometEntityMenuEmbeddedrelayprovider":true,"__relay_internal__pv__GlobalPanelEnabledrelayprovider":false}','server_timestamps':'true','doc_id':'5853134681430324','fb_api_analytics_tags':'["qpl_active_flow_ids=431626709"]',}
142
143
try:
144
145
join = requests.post('https://www.facebook.com/api/graphql/',headers=headers, data=data).text
146
147
if self.user_id in join:
148
149
return True
150
151
else:
152
153
return join
154
155
except:
156
157
return False
158
159
160
161
def reac_cmt(self, id, type_react):
162
163
access = ""
164
165
url = requests.get("https://mbasic.facebook.com/"+id, headers=self.headers, proxies="").url
166
167
if id in url:
168
169
return False
170
171
index = 1 if type_react == "LIKE" else 2 if type_react == "LOVE" else 3 if type_react == "CARE" else 4 if type_react == "HAHA" else 5 if type_react == "WOW" else 6 if type_react == "SAD" else 7
172
173
access = requests.get(url, headers=self.headers).text
174
175
while True:
176
177
if id in access:
178
179
find_cmt = access.split(id)[1].split('</a></span></span>')[0].split('/reactions/picker/?')[1].split('"')[0].replace("amp;", "")
180
181
access = requests.get("https://mbasic.facebook.com/reactions/picker/?"+find_cmt, headers=self.headers).text
182
183
ufi = access.split('/ufi/reaction/?')
184
185
hoan_thanh = requests.get("https://mbasic.facebook.com/ufi/reaction/?"+ufi[index].split('"')[0].replace("amp;", ""), headers=self.headers).text
186
187
return True
188
189
else:
190
191
if "/comment/replies/" in url:
192
193
xemthemcmt = access.split('/comment/replies/?')[1].split('"')[0].replace("amp;", "")
194
195
access = requests.get("https://mbasic.facebook.com/comment/replies/?"+xemthemcmt, headers=self.headers).text
196
197
else:
198
199
xemthemcmt = access.split('/story.php?')[1].split('</a></div></div>')[0].replace("amp;", "").split('"')[0]
200
201
access = requests.get("https://mbasic.facebook.com/story.php?"+xemthemcmt, headers=self.headers).text
202
203
204
205
def like(self, id, type):
206
207
if '_' in id:
208
209
uid = id.split('_')[1]
210
211
else:
212
213
uid = id
214
215
list = {'LIKE':1, 'LOVE':2, 'CARE':3, 'HAHA':4, 'WOW':5, 'SAD':6, 'ANGRY':7}
216
217
headers = {
218
219
"authority": "mbasic.facebook.com",
220
221
"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",
222
223
"content-type": "application/x-www-form-urlencoded",
224
225
#"sec-ch-ua": '".Not/A)Brand";v="99", "Google Chrome";v="103", "Chromium";v="103"',
226
227
"sec-ch-ua-mobile": "?0",
228
229
'sec-ch-ua-platform': '"Windows"',
230
231
"sec-fetch-dest": "document",
232
233
"sec-fetch-mode": "navigate",
234
235
"sec-fetch-site": "none",
236
237
"sec-fetch-user": "?1",
238
239
"upgrade-insecure-requests": "1",
240
241
"accept-language": "vi,vi-VN;q=0.9,fr-FR;q=0.8,fr;q=0.7,en-US;q=0.6,en;q=0.5,zh-CN;q=0.4,zh;q=0.3",
242
243
"cookie":self.cookie
244
245
}
246
247
248
249
try:
250
251
link = 'https://mbasic.facebook.com/reactions/picker/?ft_id='+uid
252
253
data = requests.get(link, headers=headers).text
254
255
get = data.split('<a href="')
256
257
cx = get[list[type]].split('" style="display:block">')[0].replace("amp;", "").replace(";", "&")
258
259
reac = requests.get('https://mbasic.facebook.com'+cx, headers = headers).text
260
261
#print(reac)
262
263
return True
264
265
except:
266
267
return False
268
269
270
271
def comment (self, id, msg):
272
273
try:
274
275
url = requests.get("https://mbasic.facebook.com/"+id, headers=self.headers).url
276
277
access = requests.get(url, headers=self.headers).text
278
279
cmt = re.findall('\/a\/comment.php\?fs=.*?"', access)
280
281
if cmt == []: return False
282
283
hoan_thanh = requests.post("https://mbasic.facebook.com%s"%cmt[0].replace('"', "").replace("amp;", ""), headers=self.headers, data={"fb_dtsg": self.fb_dtsg,"jazoest": self.jazoest, "comment_text": msg}).text
284
285
return hoan_thanh
286
287
except:
288
289
return False
290
291
292
293
def share(self, id, nd="Trần Tiến"):
294
295
try:
296
297
url = requests.get('https://mbasic.facebook.com/'+id, headers=self.headers).url
298
299
ac = requests.get(url, headers=self.headers).text
300
301
node_share = re.findall('\/composer\/mbasic\/\?c_src=share.*?"', ac)
302
303
if node_share == []:
304
305
return False
306
307
truycapshare = ac.split('/composer/mbasic/?c_src=share')[1].split('"')[0].replace('amp;', '')
308
309
ac = requests.get('https://mbasic.facebook.com/composer/mbasic/?c_src=share'+truycapshare, headers=self.headers).text
310
311
fb = ac.split('name="fb_dtsg" value="')[1].split('"')[0]
312
313
jaz = ac.split('name="jazoest" value="')[1].split('"')[0]
314
315
target = ac.split('name="target" value="')[1].split('"')[0]
316
317
csid = ac.split('name="csid" value="')[1].split('"')[0]
318
319
privacyx = ac.split('name="privacyx" value="')[1].split('"')[0]
320
321
sid = ac.split('name="sid" value="')[1].split('"')[0]
322
323
324
325
data = {
326
327
"fb_dtsg": fb,
328
329
"jazoest": jaz,
330
331
"at": "",
332
333
"target": target,
334
335
"csid": csid,
336
337
"c_src": "share",
338
339
"referrer": "feed",
340
341
"ctype": "advanced",
342
343
"cver": "amber_share",
344
345
"users_with": "",
346
347
"album_id": "",
348
349
"waterfall_source": "advanced_composer_timeline",
350
351
"privacyx": privacyx,
352
353
"appid": "0",
354
355
"sid": sid,
356
357
"linkUrl": "",
358
359
"m": "self",
360
361
"xc_message": "",
362
363
"view_post": "Chia sẻ",
364
365
"shared_from_post_id": sid,
366
367
}
368
369
share = ac.split('/composer/mbasic/?csid=')[2].split('"')[0].replace('amp;', '')
370
371
hoan_thanh = requests.post('https://mbasic.facebook.com/composer/mbasic/?csid='+share, headers=self.headers, data=data).text
372
373
return True
374
375
except:
376
377
return False
378
379
class TraoDoiSub_Api (object):
380
381
def __init__ (self, token):
382
383
self.token = token
384
385
386
387
def main(self):
388
389
try:
390
391
main = requests.get('https://traodoisub.com/api/?fields=profile&access_token='+self.token).json()
392
393
try:
394
395
return main['data']
396
397
except:
398
399
False
400
401
except:
402
403
return False
404
405
406
407
def run(self, id):
408
409
try:
410
411
run = requests.get(f'https://traodoisub.com/api/?fields=run&id={id}&access_token={self.token}').json()
412
413
try:
414
415
run['data']['id']
416
417
return True
418
419
except:
420
421
return False
422
423
except:
424
425
return False
426
427
def get_job(self, type):
428
429
try:
430
431
get = requests.get(f'https://traodoisub.com/api/?fields={type}&access_token={self.token}',headers = {'user-agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36'})
432
433
return get
434
435
except:
436
437
return False
438
439
440
441
def nhan_xu(self, type, id):
442
443
try:
444
445
nhan = requests.get(f'https://traodoisub.com/api/coin/?type={type}&id={id}&access_token={self.token}',headers = {'user-agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36'}).json()
446
447
try:
448
449
xu = nhan['data']['xu']
450
451
msg = nhan['data']['msg']
452
453
return msg, xu
454
455
except:
456
457
return nhan
458
459
except:
460
461
return False
462
463
464
465
466
467
def bongoc(so):
468
469
a= "\033[1;31m────"*so
470
471
print(a)
472
473
def hoanthanh(dem, id, type, msg, xu):
474
475
uid = id.split('_')[1] if '_' in id else id
476
477
time=datetime.now().strftime("%H:%M:%S")
478
479
print(f'\033[1;31m[\033[1;33m{dem}\033[1;31m] \033[1;31m| \033[1;36m{time} \033[1;31m| \033[1;36m{type} \033[1;31m| \033[1;33m{uid} \033[1;31m| \033[1;32m{msg} \033[1;31m| \033[1;33m{xu} \033[1;31m|')
480
481
482
483
def error(id, type):
484
485
time=datetime.now().strftime("%H:%M:%S")
486
487
uid = id.split('_')[1] if '_' in id else id
488
489
print(f'\033[1;31m Đang Lỗi ', end = '\r'); sleep(2); print(' ', end = '\r')
490
491
492
493
def Nhap_Cookie():
494
495
list_cookie = []
496
497
i = 0
498
499
while True:
500
501
i += 1
502
503
cookie = input(f'\033[1;34m[\033[1;33m●\033[1;34m] \033[1;37m=> \033[1;32mNhập Cookie Facebook Thứ: \033[1;33m{i}: ')
504
505
if cookie == '' and i > 1:
506
507
break
508
509
fb = Facebook_Api(cookie)
510
511
name = fb.get_thongtin()
512
513
if name != 0:
514
515
ten = name[0]
516
517
print('\033[1;31m────────────────────────────────────────────────────────────')
518
519
print(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mTên Facebook: {ten}')
520
521
list_cookie.append(cookie)
522
523
print('\033[1;31m────────────────────────────────────────────────────────────')
524
525
else:
526
527
print('Cookie Facebook Die ! Vui Lòng Nhập Lại !!!')
528
529
print('\033[1;31m────────────────────────────────────────────────────────────')
530
531
i-=1
532
533
return list_cookie
534
535
def chongblock(delaybl):
536
537
for i in range(delaybl, -1, -1):
538
539
print(f' Đang hoạt động chống block sẽ chạy lại sau {i} giây ',end = '\r');sleep(1); print(' ', end = '\r')
540
541
def nghingoi(delaymin, delaymax):
542
543
delay = randint(delaymin, delaymax)
544
545
for i in range(delay, -1, -1):
546
547
sleep(1)
548
549
550
551
def main():
552
553
ntool = 0
554
555
dem = 0
556
557
banner()
558
559
while True:
560
561
if os.path.exists('configtds.txt'):
562
563
with open('configtds.txt', 'r') as f:
564
565
token = f.read()
566
567
tds = TraoDoiSub_Api(token)
568
569
data = tds.main()
570
571
try:
572
573
print('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mNhập [\033[1;33m1\033[1;32m] Giữ Lại Tài Khoản '+ data['user'] )
574
575
print('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mNhập [\033[1;33m2\033[1;32m] Nhập Access_Token TDS Mới')
576
577
chon = input('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mNhập \033[1;37m===>:\033[1;33m ')
578
579
if chon == '2':
580
581
os.remove('configtds.txt')
582
583
elif chon == '1':
584
585
pass
586
587
else:
588
589
print('Lựa chọn không xác định !!!');bongoc(14)
590
591
continue
592
593
except:
594
595
os.remove('configtds.txt')
596
597
if not os.path.exists('configtds.txt'):
598
599
token = input('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mNhập Access_Token TDS:\033[1;33m ')
600
601
with open('configtds.txt', 'w') as f:
602
603
f.write(token)
604
605
with open('configtds.txt', 'r') as f:
606
607
token = f.read()
608
609
tds = TraoDoiSub_Api(token)
610
611
data = tds.main()
612
613
try:
614
615
xu = data['xu']
616
617
xudie = data['xudie']
618
619
user = data['user']
620
621
break
622
623
except:
624
625
print('Access Token Không Hợp Lệ! Xin Thử Lại ')
626
627
os.remove('configtds.txt')
628
629
continue
630
631
print('\033[1;31m────────────────────────────────────────────────────────────')
632
633
634
635
while True:
636
637
if os.path.exists('Cookie_FB.txt'):
638
639
print('\033[1;34m[\033[1;33m●\033[1;34m] \033[1;37m=> \033[1;32mNhập [\033[1;33m1\033[1;32m] Sử Dụng Cookie Facebook Đã Lưu ')
640
641
print('\033[1;34m[\033[1;33m●\033[1;34m] \033[1;37m=> \033[1;32mNhập [\033[1;33m2\033[1;32m] Nhập Cookie Facebook Mới')
642
643
chon = input('\033[1;34m[\033[1;33m●\033[1;34m] \033[1;37m=> \033[1;32mVui Lòng Nhập:\033[1;33m ')
644
645
if chon == '1':
646
647
print('\033[1;32mĐang Lấy Dữ Liệu Đã Lưu');sleep(1)
648
649
with open('Cookie_FB.txt', 'r') as f:
650
651
list_cookie = json.loads(f.read())
652
653
break
654
655
elif chon == '2':
656
657
os.remove('Cookie_FB.txt'); bongoc(14)
658
659
else:
660
661
print('Lựa Chọn Không Xác Định.'); bongoc(14); continue
662
663
if not os.path.exists('Cookie_FB.txt'):
664
665
list_cookie = Nhap_Cookie()
666
667
with open('Cookie_FB.txt', 'w') as f:
668
669
json.dump(list_cookie, f)
670
671
break
672
673
674
675
676
677
banner()
678
679
print(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mTên Tài Khoản: {user} ')
680
681
print(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mXu Hiện Tại: {xu}')
682
683
print(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mXu Bị Phạt: {xudie} ')
684
685
print(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;32mSố Cookie: {len(list_cookie)} ')
686
687
print('\033[1;31m────────────────────────────────────────────────────────────')
688
689
print('\033[1;32m[1 : LIKE — 2 : COMMENT — 3 : SHARE — 4 : REACTION]')
690
691
print('\033[1;32m[5 : FOLLOW — 6 : PAGE — 7 : REACTCMT — 8 : GROUP]')
692
693
print('\033[1;31m────────────────────────────────────────────────────────────')
694
695
print('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mCó Thể Chọn Nhiều Nhiệm Vụ (Ví Dụ 123...)')
696
697
nhiemvu = input ('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mNhập Nhiệm Vụ Cần Chạy: ')
698
699
delaymin = int(input('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mNhập Delay Min: '))
700
701
delaymax = int(input('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mNhập Delay Max: '))
702
703
print('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mSau ____ Nhiệm Vụ Thì Kích Hoạt Chống Block.',end='\r')
704
705
nvblock = int(input('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mSau '))
706
707
print(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mSau {nvblock} Nhiệm Vụ Nghỉ Ngơi ____ Giây ',end='\r')
708
709
delaybl = int(input(f'\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mSau {nvblock} Nhiệm Vụ Nghỉ Ngơi '))
710
711
doinick = int(input('\033[1;31m[\033[1;32m⟨⟩\033[1;31m]\033[1;33m ➩ \033[1;29mSau Bao Nhiêu Nhiệm Vụ Thì Đổi Nick: '))
712
713
print('\033[1;31m────────────────────────────────────────────────────────────')
714
715
while True:
716
717
if len(list_cookie) == 0:
718
719
print('Đã Xoá Tất Cả Cookie, Vui Lòng Nhập Lại ')
720
721
list_cookie = Nhap_Cookie()
722
723
with open('Cookie_FB.txt', 'w') as f:
724
725
json.dump(list_cookie, f)
726
727
for cookie in list_cookie:
728
729
loilike, loicmt, loishare, loicx, loifollow, loipage, loicxcmt, loigroup = 0, 0, 0, 0, 0, 0, 0, 0
730
731
fb = Facebook_Api(cookie)
732
733
name = fb.get_thongtin()
734
735
if name != 0:
736
737
ten = name[0]
738
739
id = name[1]
740
741
else:
742
743
id = cookie.split('c_user=')[1].split(';')[0]
744
745
print(f'Cookie Tài Khoản {id} Die', end='\r');sleep(3); print(' ', end = '\r' )
746
747
list_cookie.remove(cookie)
748
749
continue
750
751
cau_hinh = tds.run(id)
752
753
if cau_hinh == True:
754
755
print(f'\033[1;33mĐang Cấu Hình ID FB: {id} \033[1;37m| \033[1;32mTên FB: {ten}')
756
757
print('\033[1;31m────────────────────────────────────────────────────────────')
758
759
else:
760
761
print(f'Cấu Hình Thất Bại ID FB: {id} | Tên FB: {ten} ', end = '\r')
762
763
continue
764
765
ntool = 0
766
767
while True:
768
769
770
771
nvlike = 1 if '1' in nhiemvu else 0
772
773
nvlike2 = 1 if '1' in nhiemvu else 0
774
775
nvlike3 = 1 if '1' in nhiemvu else 0
776
777
nvcmt = 1 if '2' in nhiemvu else 0
778
779
nvshare = 1 if '3' in nhiemvu else 0
780
781
nvcx = 1 if '4' in nhiemvu else 0
782
783
nvfollow = 1 if '5' in nhiemvu else 0
784
785
nvpage = 1 if '6' in nhiemvu else 0
786
787
nvcxcmt = 1 if '7' in nhiemvu else 0
788
789
nvgroup = 1 if '8' in nhiemvu else 0
790
791
######
792
793
794
795
if nvlike == 1:
796
797
listlike = tds.get_job('like')
798
799
if listlike == False:
800
801
print('Không Get Được Nhiệm Vụ Like ', end = '\r');sleep(2); print(' ', end = '\r')
802
803
nvlike = 0
804
805
elif 'error' in listlike.text:
806
807
if listlike.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
808
809
coun = listlike.json()['countdown']
810
811
print(f'Đang Get Nhiệm Vụ Like, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
812
813
else:
814
815
print(listlike.json()['error'] , end ='\r')
816
817
nvlike = 0
818
819
else:
820
821
listlike = listlike.json()
822
823
if len(listlike) == 0:
824
825
print('Hết Nhiệm Vụ Like ', end = '\r');sleep(2); print(' ', end = '\r')
826
827
nvlike = 0
828
829
else:
830
831
print(f'\033[1;32mTìm Thấy {len(listlike)} Nhiệm Vụ Like ', end = '\r')
832
833
for x in listlike:
834
835
id = x['id']
836
837
like = fb.like(id, 'LIKE')
838
839
if like == False:
840
841
error(id, 'LIKE')
842
843
loilike += 1
844
845
else:
846
847
nhan=tds.nhan_xu('LIKE', id)
848
849
try:
850
851
xu = nhan[1]
852
853
msg = nhan[0]
854
855
dem+=1
856
857
hoanthanh(dem, id, 'LIKE', msg, xu)
858
859
loilike = 0
860
861
if dem % doinick == 0:
862
863
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
864
865
if dem % nvblock == 0:
866
867
chongblock(delaybl)
868
869
else:
870
871
nghingoi(delaymin, delaymax)
872
873
except:
874
875
error(id, 'LIKE')
876
877
loilike += 1
878
879
880
881
if loilike >= 5:
882
883
name = fb.get_thongtin()
884
885
if name == 0:
886
887
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
888
889
else:
890
891
print(f' Tài Khoản {ten} Đã Bị Block Like !!! ')
892
893
list_cookie.remove(cookie)
894
895
ntool = 1
896
897
break
898
899
900
901
if ntool == 1:
902
903
break
904
905
906
907
if nvlike2 == 1:
908
909
listlike2 = tds.get_job('likegiare')
910
911
if listlike2 == False:
912
913
print('Không Get Được Nhiệm Vụ Like 2 ', end = '\r');sleep(2); print(' ', end = '\r')
914
915
nvlike2 = 0
916
917
elif 'error' in listlike2.text:
918
919
if listlike2.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
920
921
coun = listlike2.json()['countdown']
922
923
print(f'Đang Get Nhiệm Vụ Like 2, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
924
925
else:
926
927
print(listlike2.json()['error'] , end ='\r')
928
929
nvlike2 = 0
930
931
else:
932
933
listlike2 = listlike2.json()
934
935
if len(listlike2) == 0:
936
937
print('Hết Nhiệm Vụ Like 2 ', end = '\r');sleep(2); print(' ', end = '\r')
938
939
nvlike2 = 0
940
941
else:
942
943
print(f'\033[1;32mTìm Thấy {len(listlike2)} Nhiệm Vụ Like 2 ', end = '\r')
944
945
for x in listlike2:
946
947
id = x['id']
948
949
like = fb.like(id, 'LIKE')
950
951
if like == False:
952
953
error(id, 'LIKE 2')
954
955
loilike+=1
956
957
else:
958
959
nhan=tds.nhan_xu('LIKEGIARE', id)
960
961
try:
962
963
xu = nhan[1]
964
965
msg = nhan[0]
966
967
dem+=1
968
969
hoanthanh(dem, id, 'LIKE 2', msg, xu)
970
971
loilike=0
972
973
if dem % doinick == 0:
974
975
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
976
977
if dem % nvblock == 0:
978
979
chongblock(delaybl)
980
981
else:
982
983
nghingoi(delaymin, delaymax)
984
985
except:
986
987
error(id, 'LIKE 2')
988
989
loilike+=1
990
991
992
993
994
995
if loilike >= 5:
996
997
name = fb.get_thongtin()
998
999
if name == 0:
1000
1001
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1002
1003
else:
1004
1005
print(f' Tài Khoản {ten} Đã Bị Block Like !!! ')
1006
1007
list_cookie.remove(cookie)
1008
1009
ntool = 1
1010
1011
break
1012
1013
if ntool == 1:
1014
1015
break
1016
1017
1018
1019
if nvlike3 == 1:
1020
1021
listlike3 = tds.get_job('likesieure')
1022
1023
if listlike3 == False:
1024
1025
print('Không Get Được Nhiệm Vụ Like 3 ', end = '\r');sleep(2); print(' ', end = '\r')
1026
1027
nvlike3 = 0
1028
1029
elif 'error' in listlike3.text:
1030
1031
if listlike3.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1032
1033
coun = listlike3.json()['countdown']
1034
1035
print(f'Đang Get Nhiệm Vụ Like 3, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1036
1037
else:
1038
1039
print(listlike3.json()['error'] , end ='\r')
1040
1041
nvlike3 = 0
1042
1043
else:
1044
1045
listlike3 = listlike3.json()
1046
1047
if len(listlike3) == 0:
1048
1049
print('Hết Nhiệm Vụ Like 3 ', end = '\r');sleep(2); print(' ', end = '\r')
1050
1051
nvlike3 = 0
1052
1053
else:
1054
1055
print(f'\033[1;32mTìm Thấy {len(listlike3)} Nhiệm Vụ Like 2 ', end = '\r')
1056
1057
for x in listlike3:
1058
1059
id = x['id']
1060
1061
like = fb.like(id, 'LIKE')
1062
1063
if like == False:
1064
1065
error(id, 'LIKE 3')
1066
1067
loilike+=1
1068
1069
else:
1070
1071
nhan=tds.nhan_xu('LIKESIEURE', id)
1072
1073
try:
1074
1075
xu = nhan[1]
1076
1077
msg = nhan[0]
1078
1079
dem+=1
1080
1081
hoanthanh(dem, id, 'LIKE 3', msg, xu)
1082
1083
loilike=0
1084
1085
if dem % doinick == 0:
1086
1087
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1088
1089
if dem % nvblock == 0:
1090
1091
chongblock(delaybl)
1092
1093
else:
1094
1095
nghingoi(delaymin, delaymax)
1096
1097
except:
1098
1099
error(id, 'LIKE 3')
1100
1101
loilike+=1
1102
1103
1104
1105
1106
1107
if loilike >= 5:
1108
1109
name = fb.get_thongtin()
1110
1111
if name == 0:
1112
1113
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1114
1115
else:
1116
1117
print(f' Tài Khoản {ten} Đã Bị Block Like !!! ')
1118
1119
list_cookie.remove(cookie)
1120
1121
ntool = 1
1122
1123
break
1124
1125
if ntool == 1:
1126
1127
break
1128
1129
if nvcmt == 1:
1130
1131
listcmt = tds.get_job('comment')
1132
1133
if listcmt == False:
1134
1135
print('Không Get Được Nhiệm Vụ Comment ', end = '\r');sleep(2); print(' ', end = '\r')
1136
1137
nvcmt = 0
1138
1139
elif 'error' in listcmt.text:
1140
1141
if listcmt.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1142
1143
coun = listcmt.json()['countdown']
1144
1145
print(f'Đang Get Nhiệm Vụ Comment, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1146
1147
else:
1148
1149
print(listcmt.json()['error'] , end ='\r')
1150
1151
nvcmt = 0
1152
1153
else:
1154
1155
listcmt = listcmt.json()
1156
1157
if len(listcmt) == 0:
1158
1159
print('Hết Nhiệm Vụ Comment ', end = '\r');sleep(2); print(' ', end = '\r')
1160
1161
nvcmt = 0
1162
1163
else:
1164
1165
print(f'\033[1;32mTìm Thấy {len(listcmt)} Nhiệm Vụ Comment ', end = '\r')
1166
1167
for x in listcmt:
1168
1169
id = x['id']
1170
1171
msg = x['msg']
1172
1173
cmt = fb.comment(id, msg)
1174
1175
if cmt == False:
1176
1177
error(id, 'COMMENT')
1178
1179
loicmt+=1
1180
1181
else:
1182
1183
nhan=tds.nhan_xu('COMMENT', id)
1184
1185
try:
1186
1187
xu = nhan[1]
1188
1189
msg = nhan[0]
1190
1191
dem+=1
1192
1193
hoanthanh(dem, id, 'COMMENT', msg, xu)
1194
1195
loicmt=0
1196
1197
if dem % doinick == 0:
1198
1199
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1200
1201
if dem % nvblock == 0:
1202
1203
chongblock(delaybl)
1204
1205
else:
1206
1207
nghingoi(delaymin, delaymax)
1208
1209
except:
1210
1211
error(id, 'COMMENT')
1212
1213
loicmt+=1
1214
1215
1216
1217
if loicmt >= 5:
1218
1219
name = fb.get_thongtin()
1220
1221
if name == 0:
1222
1223
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1224
1225
else:
1226
1227
print(f' Tài Khoản {ten} Đã Bị Block Comment !!! ')
1228
1229
list_cookie.remove(cookie)
1230
1231
ntool = 1
1232
1233
break
1234
1235
1236
1237
if ntool == 1:
1238
1239
break
1240
1241
if nvshare == 1:
1242
1243
listshare = tds.get_job('share')
1244
1245
if listshare == False:
1246
1247
print('Không Get Được Nhiệm Vụ Share ', end = '\r');sleep(2); print(' ', end = '\r')
1248
1249
nvshare = 0
1250
1251
elif 'error' in listshare.text:
1252
1253
if listshare.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1254
1255
coun = listshare.json()['countdown']
1256
1257
print(f'Đang Get Nhiệm Vụ Share, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1258
1259
else:
1260
1261
print(listshare.json()['error'] , end ='\r')
1262
1263
nvshare = 0
1264
1265
else:
1266
1267
listshare = listshare.json()
1268
1269
if len(listshare) == 0:
1270
1271
print('Hết Nhiệm Vụ Share ', end = '\r');sleep(2); print(' ', end = '\r')
1272
1273
nvshare = 0
1274
1275
else:
1276
1277
print(f'\033[1;32mTìm Thấy {len(listshare)} Nhiệm Vụ Share ', end = '\r')
1278
1279
for x in listshare:
1280
1281
id = x['id']
1282
1283
share = fb.share(id)
1284
1285
if share == False:
1286
1287
error(id, 'SHARE')
1288
1289
loishare+=1
1290
1291
else:
1292
1293
nhan=tds.nhan_xu('SHARE', id)
1294
1295
try:
1296
1297
xu = nhan[1]
1298
1299
msg = nhan[0]
1300
1301
dem+=1
1302
1303
hoanthanh(dem, id, 'SHARE', msg, xu)
1304
1305
loishare = 0
1306
1307
if dem % doinick == 0:
1308
1309
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1310
1311
if dem % nvblock == 0:
1312
1313
chongblock(delaybl)
1314
1315
else:
1316
1317
nghingoi(delaymin, delaymax)
1318
1319
except:
1320
1321
error(id, 'SHARE')
1322
1323
loishare+=1
1324
1325
1326
1327
if loishare >= 5:
1328
1329
name = fb.get_thongtin()
1330
1331
if name == 0:
1332
1333
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1334
1335
else:
1336
1337
print(f' Tài Khoản {ten} Đã Bị Block Share !!! ')
1338
1339
list_cookie.remove(cookie)
1340
1341
ntool = 1
1342
1343
break
1344
1345
1346
1347
1348
1349
if ntool == 1:
1350
1351
break
1352
1353
if nvcx == 1:
1354
1355
listcx = tds.get_job('reaction')
1356
1357
if listcx == False:
1358
1359
print('Không Get Được Nhiệm Vụ Cảm Xúc ', end = '\r');sleep(2); print(' ', end = '\r')
1360
1361
nvcx = 0
1362
1363
elif 'error' in listcx.text:
1364
1365
if listcx.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1366
1367
coun = listcx.json()['countdown']
1368
1369
print(f'Đang Get Nhiệm Vụ Cảm Xúc, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1370
1371
else:
1372
1373
print(listcx.json()['error'] , end ='\r')
1374
1375
nvcx = 0
1376
1377
else:
1378
1379
listcx = listcx.json()
1380
1381
if len(listcx) == 0:
1382
1383
print('Hết Nhiệm Vụ Cảm Xúc ', end = '\r');sleep(2); print(' ', end = '\r')
1384
1385
nvcx = 0
1386
1387
else:
1388
1389
print(f'\033[1;32mTìm Thấy {len(listcx)} Nhiệm Vụ Cảm Xúc ', end = '\r')
1390
1391
for x in listcx:
1392
1393
id = x['id']
1394
1395
type = x['type']
1396
1397
reac = fb.like(id, type)
1398
1399
if reac == False:
1400
1401
error(id, type)
1402
1403
loilike += 1
1404
1405
else:
1406
1407
nhan=tds.nhan_xu(type, id)
1408
1409
try:
1410
1411
xu = nhan[1]
1412
1413
msg = nhan[0]
1414
1415
dem+=1
1416
1417
hoanthanh(dem, id, type, msg, xu)
1418
1419
loilike = 0
1420
1421
if dem % doinick == 0:
1422
1423
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1424
1425
if dem % nvblock == 0:
1426
1427
chongblock(delaybl)
1428
1429
else:
1430
1431
nghingoi(delaymin, delaymax)
1432
1433
except:
1434
1435
error(id, type)
1436
1437
loilike += 1
1438
1439
1440
1441
1442
1443
if loilike >= 5:
1444
1445
name = fb.get_thongtin()
1446
1447
if name == 0:
1448
1449
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1450
1451
else:
1452
1453
print(f' Tài Khoản {ten} Đã Bị Block Cảm Xúc !!! ')
1454
1455
list_cookie.remove(cookie)
1456
1457
ntool = 1
1458
1459
break
1460
1461
1462
1463
if ntool == 1:
1464
1465
break
1466
1467
if nvfollow == 1:
1468
1469
listfollow = tds.get_job('follow')
1470
1471
if listfollow == False:
1472
1473
print('Không Get Được Nhiệm Vụ Follow ', end = '\r');sleep(2); print(' ', end = '\r')
1474
1475
nvfollow = 0
1476
1477
listfollow = []
1478
1479
elif 'error' in listfollow.text:
1480
1481
if listfollow.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1482
1483
coun = listfollow.json()['countdown']
1484
1485
print(f'Đang Get Nhiệm Vụ Follow, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1486
1487
else:
1488
1489
print(listfollow.json()['error'] , end ='\r')
1490
1491
sleep(2)
1492
1493
nvfollow = 0
1494
1495
listfollow = []
1496
1497
else:
1498
1499
listfollow = listfollow.json()
1500
1501
if len(listfollow) == 0:
1502
1503
print('Hết Nhiệm Vụ Follow ', end = '\r');sleep(2); print(' ', end = '\r')
1504
1505
nvfollow = 0
1506
1507
else:
1508
1509
print(f'\033[1;32mTìm Thấy {len(listfollow)} Nhiệm Vụ Follow ', end = '\r')
1510
1511
for x in listfollow:
1512
1513
id = x['id']
1514
1515
follow = fb.follow(id)
1516
1517
if follow == False:
1518
1519
error(id, 'FOLLOW')
1520
1521
loifollow += 1
1522
1523
else:
1524
1525
nhan=tds.nhan_xu('FOLLOW', id)
1526
1527
try:
1528
1529
xu = nhan[1]
1530
1531
msg = nhan[0]
1532
1533
dem+=1
1534
1535
hoanthanh(dem, id, 'FOLLOW', msg, xu)
1536
1537
loifollow=0
1538
1539
if dem % doinick == 0:
1540
1541
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1542
1543
if dem % nvblock == 0:
1544
1545
chongblock(delaybl)
1546
1547
else:
1548
1549
nghingoi(delaymin, delaymax)
1550
1551
except:
1552
1553
error(id, 'FOLLOW')
1554
1555
loifollow += 1
1556
1557
1558
1559
if loifollow >= 5:
1560
1561
name = fb.get_thongtin()
1562
1563
if name == 0:
1564
1565
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1566
1567
else:
1568
1569
print(f' Tài Khoản {ten} Đã Bị Block Follow !!! ')
1570
1571
list_cookie.remove(cookie)
1572
1573
ntool = 1
1574
1575
break
1576
1577
1578
1579
if ntool == 1:
1580
1581
break
1582
1583
if nvpage == 1:
1584
1585
listpage = tds.get_job('page')
1586
1587
if listpage == False:
1588
1589
print('Không Get Được Nhiệm Vụ Like Page ', end = '\r');sleep(2); print(' ', end = '\r')
1590
1591
nvpage = 0
1592
1593
listpage = []
1594
1595
elif 'error' in listpage.text:
1596
1597
if listpage.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1598
1599
coun = listpage.json()['countdown']
1600
1601
print(f'Đang Get Nhiệm Vụ Page, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1602
1603
else:
1604
1605
print(listpage.json()['error'] , end ='\r')
1606
1607
nvpage = 0
1608
1609
listpage = []
1610
1611
else:
1612
1613
listpage = listpage.json()
1614
1615
if len(listpage) == 0:
1616
1617
print('Hết Nhiệm Vụ Like Page ', end = '\r');sleep(2); print(' ', end = '\r')
1618
1619
nvpage = 0
1620
1621
else:
1622
1623
print(f'\033[1;32mTìm Thấy {len(listpage)} Nhiệm Vụ Like Page ', end = '\r')
1624
1625
for x in listpage:
1626
1627
id = x['id']
1628
1629
page = fb.page(id)
1630
1631
if page == False:
1632
1633
error(id, 'PAGE')
1634
1635
loipage+=1
1636
1637
else:
1638
1639
nhan=tds.nhan_xu('PAGE', id)
1640
1641
try:
1642
1643
xu = nhan[1]
1644
1645
msg = nhan[0]
1646
1647
dem+=1
1648
1649
hoanthanh(dem, id, 'PAGE', msg, xu)
1650
1651
loipage = 0
1652
1653
if dem % doinick == 0:
1654
1655
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1656
1657
if dem % nvblock == 0:
1658
1659
chongblock(delaybl)
1660
1661
else:
1662
1663
nghingoi(delaymin, delaymax)
1664
1665
except:
1666
1667
error(id, 'PAGE')
1668
1669
loipage+=1
1670
1671
1672
1673
1674
1675
if loipage >= 5:
1676
1677
name = fb.get_thongtin()
1678
1679
if name == 0:
1680
1681
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1682
1683
else:
1684
1685
print(f' Tài Khoản {ten} Đã Bị Block Like Page !!! ')
1686
1687
list_cookie.remove(cookie)
1688
1689
ntool = 1
1690
1691
break
1692
1693
if ntool == 1:
1694
1695
break
1696
1697
if nvcxcmt == 1:
1698
1699
listcxcmt = tds.get_job('reactcmt')
1700
1701
if listcxcmt == False:
1702
1703
print('Không Get Được Nhiệm Vụ Cảm Xúc Comment ', end = '\r');sleep(2); print(' ', end = '\r')
1704
1705
nvcxcmt = 0
1706
1707
listcxcmt = []
1708
1709
elif 'error' in listcxcmt.text:
1710
1711
if listcxcmt.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1712
1713
coun = listcxcmt.json()['countdown']
1714
1715
print(f'Đang Get Nhiệm Vụ Cảm Xúc Comment, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1716
1717
else:
1718
1719
print(listcxcmt.json()['error'] , end ='\r')
1720
1721
nvcxcmt = 0
1722
1723
listcxcmt = []
1724
1725
else:
1726
1727
listcxcmt = listcxcmt.json()
1728
1729
if len(listcxcmt) == 0:
1730
1731
print('Hết Nhiệm Vụ Cảm Xúc Comment ', end = '\r');sleep(2); print(' ', end = '\r')
1732
1733
listcxcmt = 0
1734
1735
else:
1736
1737
print(f'\033[1;32mTìm Thấy {len(listcxcmt)} Nhiệm Vụ Cảm Xúc Comment ', end = '\r')
1738
1739
for x in listcxcmt:
1740
1741
id = x['id']
1742
1743
type = x['type']
1744
1745
cxcmt = fb.like(id, type)
1746
1747
if cxcmt == False:
1748
1749
error(id, type+'CMT')
1750
1751
loicxcmt+=1
1752
1753
else:
1754
1755
nhan=tds.nhan_xu(type+'CMT', id)
1756
1757
try:
1758
1759
#if True:
1760
1761
xu = nhan[1]
1762
1763
msg = nhan[0]
1764
1765
dem+=1
1766
1767
hoanthanh(dem, id, type+'CMT', msg, xu)
1768
1769
loicxcmt=0
1770
1771
if dem % doinick == 0:
1772
1773
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1774
1775
if dem % nvblock == 0:
1776
1777
chongblock(delaybl)
1778
1779
else:
1780
1781
nghingoi(delaymin, delaymax)
1782
1783
except:
1784
1785
error(id, type+'CMT')
1786
1787
loicxcmt+=1
1788
1789
1790
1791
if loicxcmt >= 5:
1792
1793
name = fb.get_thongtin()
1794
1795
if name == 0:
1796
1797
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1798
1799
else:
1800
1801
print(f' Tài Khoản {ten} Đã Bị Block Cảm Xúc CMT !!! ')
1802
1803
list_cookie.remove(cookie)
1804
1805
ntool = 1
1806
1807
break
1808
1809
if ntool == 1:
1810
1811
break
1812
1813
if nvgroup == 1:
1814
1815
listgroup = tds.get_job('group')
1816
1817
if listgroup == False:
1818
1819
print('Không Get Được Nhiệm Vụ Group ', end = '\r');sleep(2); print(' ', end = '\r')
1820
1821
nvgroup = 0
1822
1823
listgroup = []
1824
1825
elif 'error' in listgroup.text:
1826
1827
if listgroup.json()['error'] == 'Thao tác quá nhanh vui lòng chậm lại':
1828
1829
coun = listgroup.json()['countdown']
1830
1831
print(f'Đang Get Nhiệm Vụ Group, COUNTDOWN: {str(round(coun, 3))} ', end = '\r'); sleep(2); print(' ', end = '\r')
1832
1833
else:
1834
1835
print(listlike.json()['error'] , end ='\r')
1836
1837
nvgroup = 0
1838
1839
listgroup = []
1840
1841
else:
1842
1843
listgroup = listgroup.json()
1844
1845
if len(listgroup) == 0:
1846
1847
print('Hết Nhiệm Vụ Group ', end = '\r');sleep(2); print(' ', end = '\r')
1848
1849
listgroup = 0
1850
1851
else:
1852
1853
print(f'\033[1;32mThấy {len(listgroup)} Nhiệm Vụ Group ', end = '\r')
1854
1855
1856
1857
for x in listgroup:
1858
1859
id = x['id']
1860
1861
gr = fb.group(id)
1862
1863
if gr == False:
1864
1865
error(id, 'GROUP')
1866
1867
loigroup += 1
1868
1869
else:
1870
1871
nhan=tds.nhan_xu('GROUP', id)
1872
1873
try:
1874
1875
xu = nhan[1]
1876
1877
msg = nhan[0]
1878
1879
dem+=1
1880
1881
hoanthanh(dem, id, 'GROUP', msg, xu)
1882
1883
loigroup = 0
1884
1885
if dem % doinick == 0:
1886
1887
bongoc(14); print(f'Số Xu Hiện Tại: {xu} | Số Tài Khoản Facebook {len(list_cookie)}'); bongoc(14); ntool = 1; break
1888
1889
if dem % nvblock == 0:
1890
1891
chongblock(delaybl)
1892
1893
else:
1894
1895
nghingoi(delaymin, delaymax)
1896
1897
except:
1898
1899
error(id, 'GROUP')
1900
1901
loigroup += 1
1902
1903
1904
1905
if loigroup >= 5:
1906
1907
name = fb.get_thongtin()
1908
1909
if name == 0:
1910
1911
print(f' Cookie Tài Khoản {ten} Đã Bị Out !!! ')
1912
1913
else:
1914
1915
print(f' Tài Khoản {ten} Đã Bị Block Join Group !!! ')
1916
1917
list_cookie.remove(cookie)
1918
1919
ntool = 1
1920
1921
break
1922
1923
if ntool == 1:
1924
1925
break
1926
1927
if nvcx + nvgroup + nvcxcmt + nvpage + nvfollow + nvshare + nvcmt + nvlike == 0:
1928
1929
for i in range(10, 0, -1):
1930
1931
print(f' Tất Cả Các Nhiệm Vụ Đã Hết, Vui Lòng Chờ {i} Giây ', end = '\r');sleep(1); print(' ', end = '\r')
1932
1933
1934
1935
if __name__ == '__main__':
1936
1937
main()