From 3f88e59516fffa349c78951db2905fc3a1be9bee Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 21 Feb 2018 21:54:27 -0600 Subject: [PATCH] handle Python 3.5/3.6 differences so we always have a UTF-8 string --- lib/msf/core/modules/external/python/metasploit/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/modules/external/python/metasploit/module.py b/lib/msf/core/modules/external/python/metasploit/module.py index 56b6781b23..6470effe0e 100644 --- a/lib/msf/core/modules/external/python/metasploit/module.py +++ b/lib/msf/core/modules/external/python/metasploit/module.py @@ -29,7 +29,7 @@ def report_vuln(ip, name, **opts): def run(metadata, module_callback): - req = json.loads(os.read(0, 10000)) + req = json.loads(os.read(0, 10000).decode("utf-8")) if req['method'] == 'describe': rpc_send({'jsonrpc': '2.0', 'id': req['id'], 'response': metadata}) elif req['method'] == 'run':