From 60c751c27d2d613a098cdfbc8c59601ae3102c77 Mon Sep 17 00:00:00 2001 From: OJ Date: Wed, 28 Jun 2017 12:54:41 +1000 Subject: [PATCH] Fix py meterp to support python3 when generating raw headers Thanks to @zeroSteiner for this. --- python/meterpreter/meterpreter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/meterpreter/meterpreter.py b/python/meterpreter/meterpreter.py index 24735280..47813d0f 100644 --- a/python/meterpreter/meterpreter.py +++ b/python/meterpreter/meterpreter.py @@ -545,7 +545,7 @@ class Transport(object): # always return the session guid and the encryption flag set to 0 # TODO: we'll add encryption soon! xor_key = rand_xor_key() - raw = SESSION_GUID + '\x00' + pkt + raw = bytes(SESSION_GUID, 'UTF-8') + NULL_BYTE + pkt result = struct.pack('BBBB', *xor_key) + xor_bytes(xor_key, raw) return result