1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-12-02 20:36:40 +01:00

Fix py meterp to support python3 when generating raw headers

Thanks to @zeroSteiner for this.
This commit is contained in:
OJ 2017-06-28 12:54:41 +10:00
parent 9fd56beba0
commit 60c751c27d
No known key found for this signature in database
GPG Key ID: D5DC61FB93260597

View File

@ -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