File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
modules/payloads/singles/linux Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding: binary -*-
2
+
1
3
##
2
4
# This module requires Metasploit: https://metasploit.com/download
3
5
# Current source: https://github.com/rapid7/metasploit-framework
@@ -70,7 +72,9 @@ def generate(_opts = {})
70
72
shellcode = shellcode + command_string + "\x00 "
71
73
72
74
# we need to align our shellcode to 4 bytes
73
- ( shellcode = shellcode + "\x00 " ) while shellcode . length %4 != 0
75
+ while shellcode . bytesize %4 != 0
76
+ shellcode = shellcode + "\x00 "
77
+ end
74
78
75
79
return super + shellcode
76
80
Original file line number Diff line number Diff line change
1
+ # -*- coding: binary -*-
2
+
1
3
##
2
4
# This module requires Metasploit: https://metasploit.com/download
3
5
# Current source: https://github.com/rapid7/metasploit-framework
@@ -71,7 +73,9 @@ def generate(_opts = {})
71
73
shellcode = shellcode + command_string + "\x00 "
72
74
73
75
# we need to align our shellcode to 4 bytes
74
- ( shellcode = shellcode + "\x00 " ) while shellcode . length %4 != 0
76
+ while shellcode . bytesize %4 != 0
77
+ shellcode = shellcode + "\x00 "
78
+ end
75
79
76
80
return super + shellcode
77
81
You can’t perform that action at this time.
0 commit comments