Sixnut
Divine
Divine
Contributor
Premium
- Thread Author
- #2
[HIDE] # Start by importing necessary modules import socket import subprocess import os # Set up a listener on a specific port HOST = '0.0.0.0' PORT = 9999 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((HOST, PORT)) s.listen(1) # Accept incoming connections conn, addr = s.accept() # Create a subprocess to start the Remote Desktop tool p = subprocess.Popen(['C:\Windows\System32\mstsc.exe'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) # Loop through incoming data and send to Remote Desktop tool while True: data = conn.recv(1024) p.stdin.write(data) p.stdin.flush() # Read output from Remote Desktop tool and send to client output = p.stdout.read() conn.send(output) # Check for errors and send to client error = p.stderr.read() if error: conn.send(error) # Close the connection conn.close()
[/HIDE]
You have to modify it a little to fulfill what you need but here you go I had chatgpt code it
Like and rep pls Pepelove
[/HIDE]
You have to modify it a little to fulfill what you need but here you go I had chatgpt code it
Like and rep pls Pepelove