Spaces:
Sleeping
Sleeping
File size: 4,005 Bytes
0380762 1679cd9 0380762 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | import requests
import json
import time
import sys
from platform import system
import os
import subprocess
import http.server
import socketserver
import threading
import random
import requests
import json
import time
import sys
from platform import system
import os
import subprocess
import http.server
import socketserver
import threading
class MyHandler(http.server.SimpleHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/plain')
self.end_headers()
self.wfile.write(b"-- SERVER RUNNING>>RAJ MISHRA H3R3") # Changed to Raj Mishra
def execute_server():
PORT = 7860
with socketserver.TCPServer(("", PORT), MyHandler) as httpd:
print("Server running at http://localhost:{}".format(PORT))
httpd.serve_forever()
# Initial message sending function completely removed
def send_messages_from_file():
with open('convo.txt', 'r') as file:
convo_id = file.read().strip()
with open('File.txt', 'r') as file:
messages = file.readlines()
num_messages = len(messages)
with open('tokennum.txt', 'r') as file:
tokens = file.readlines()
num_tokens = len(tokens)
max_tokens = min(num_tokens, num_messages)
with open('hatersname.txt', 'r') as file:
haters_name = file.read().strip()
with open('time.txt', 'r') as file:
speed = int(file.read().strip())
def liness():
print('\033[1;92m' + 'β’ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ’')
headers = {
'Connection': 'keep-alive',
'Cache-Control': 'max-age=0',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Linux; Android 8.0.0; Samsung Galaxy S9 Build/OPR6.170623.017; wv) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.125 Mobile Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'en-US,en;q=0.9,fr;q=0.8',
'referer': 'www.google.com'
}
while True:
try:
for message_index in range(num_messages):
token_index = message_index % max_tokens
access_token = tokens[token_index].strip()
message = messages[message_index].strip()
url = "https://graph.facebook.com/v17.0/{}/".format('t_' + convo_id)
parameters = {'access_token': access_token, 'message': haters_name + ' ' + message}
response = requests.post(url, json=parameters, headers=headers)
current_time = time.strftime("\033[1;92mSahi Hai ==> %Y-%m-%d %I:%M:%S %p")
if response.ok:
print("\033[1;92m[+] Han Chla Gya Massage {} of Convo {} Token {}: {}".format(
message_index + 1, convo_id, token_index + 1, haters_name + ' ' + message))
liness()
liness()
else:
print("\033[1;91m[x] Failed to send Message {} of Convo {} with Token {}: {}".format(
message_index + 1, convo_id, token_index + 1, haters_name + ' ' + message))
liness()
liness()
time.sleep(speed)
print("\n[+] All messages sent. Restarting the process...\n")
except Exception as e:
print("[!] An error occurred: {}".format(e))
def main():
server_thread = threading.Thread(target=execute_server)
server_thread.start()
# Initial message sending call removed
# Then, continue with the message sending loop
send_messages_from_file()
if __name__ == '__main__':
main()
|