L

spammes

public
lamdayne1 Aug 07, 2024 Never 63
Clone
Python spammes 60 lines (55 loc) | 2.51 KB
1
import requests, os
2
import socket
3
os.system("clear")
4
from time import sleep
5
ip=socket.gethostbyname(socket.gethostname())
6
th='- - - - - - - - - - - - - - - - - - - - - - - - -'
7
def ban():
8
print(f"""""")
9
ban()
10
id=input('nhập id thằng cần spam: ')
11
while True:
12
ck=input('nhập cookie acc chạy spam: ')
13
try:
14
get=requests.get(f'https://mbasic.facebook.com/privacy/touch/block/confirm/?bid={id}&ret_cancel&source=profile',headers={'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','accept-language': 'vi-VN,vi;q=0.9,fr-FR;q=0.8,fr;q=0.7,en-US;q=0.6,en;q=0.5','cookie': ck,'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="102", "Google Chrome";v="102"','sec-ch-ua-mobile': '?0','sec-ch-ua-platform': '"Windows"','sec-fetch-dest': 'document','sec-fetch-mode': 'navigate','sec-fetch-site': 'same-origin','sec-fetch-user': '?1','upgrade-insecure-requests': '1'}).text
15
fb_dtsg=get.split('<input type="hidden" name="fb_dtsg" value="')[1].split('" autocomplete="off" />')[0]
16
jazoest=get.split('<input type="hidden" name="jazoest" value="')[1].split('" autocomplete="off" />')[0]
17
os.system('cls')
18
break
19
except:
20
print('Cookie sai!!')
21
22
23
24
nd=input('Nội dung: ')
25
so_luong=int(input('số lượng: '))
26
delay=int(input('delay: '))
27
headers = {
28
'authority': 'm.facebook.com',
29
'accept': '*/*',
30
'accept-language': 'vi,en;q=0.9,vi-VN;q=0.8,fr-FR;q=0.7,fr;q=0.6,en-US;q=0.5',
31
# Requests sorts cookies= alphabetically
32
'cookie': ck,
33
'origin': 'https://m.facebook.com',
34
'referer': 'https://www.facebook.com',
35
'sec-ch-ua': '"Chromium";v="104", " Not A;Brand";v="99", "Google Chrome";v="104"',
36
'sec-ch-ua-mobile': '?0',
37
'sec-ch-ua-platform': '"Windows"',
38
'sec-fetch-dest': 'empty',
39
'sec-fetch-mode': 'cors',
40
'sec-fetch-site': 'same-origin',
41
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36',
42
'x-requested-with': 'XMLHttpRequest',
43
'x-response-format': 'JSONStream',
44
}
45
46
params = {
47
'icm': '1',
48
}
49
50
data = {
51
f'ids[{id}]': id,
52
'body': nd,
53
'waterfall_source': 'message',
54
'fb_dtsg': fb_dtsg,
55
'jazoest': jazoest,
56
}
57
for i in range(1,so_luong+1):
58
response = requests.post('https://m.facebook.com/messages/send/', params=params, headers=headers, data=data)
59
print(f'{i} Send Success | {nd}')
60
sleep(delay)