-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Encoders
Marcin Bury edited this page Oct 13, 2018
·
1 revision
from routersploit.core.exploit.encoders import BaseEncoder
from routersploit.core.exploit.payloads import Architectures
class Encoder(BaseEncoder):
__info__ = {
"name": "Python Hex Encoder",
"description": "Module encodes Python payload to Hex format.",
"authors": (
"Marcin Bury <marcin[at]threat9.com>", # routersploit module
),
}
architecture = Architectures.PYTHON
def encode(self, payload):
encoded_payload = bytes(payload, "utf-8").hex()
return "exec('{}'.decode('hex'))".format(encoded_payload)
Communication