Skip to content

Commit 53c03da

Browse files
committed
using explicit bytes data in --fork-nopper for python3
* file.write() in do_exe_patch() expects buffer interface in python3: http://docs.python.org/3/tutorial/inputoutput.html
1 parent c717d3d commit 53c03da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shellnoob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def do_fork_nopper(self, exe_fp):
636636
vm_address = int(m.group(1), 16)
637637
file_offset = self.get_file_offset_from_vm_address(exe_fp, vm_address)
638638
print('Found call to fork @ 0x%x (file offset 0x%x)' % (vm_address, file_offset))
639-
self.do_exe_patch(exe_fp, '\x90\x90\x90\x31\xc0', file_offset)
639+
self.do_exe_patch(exe_fp, b'\x90\x90\x90\x31\xc0', file_offset)
640640

641641
def do_exe_patch(self, exe_fp, data, file_offset=None, vm_address=None, replace=True):
642642
if not replace:

0 commit comments

Comments
 (0)