Skip to content

Commit c288dab

Browse files
committed
fixup RHOST/RPORT expectations if only URI is set
1 parent d689b33 commit c288dab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/exploits/linux/misc/drb_remote_codeexec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ def method_syscall(p)
104104
end
105105

106106
register_file_for_cleanup(filename) if filename
107-
#print_status("payload executed from file #{filename}") unless filename.nil?
108-
#print_status("make sure to remove that file") unless filename.nil?
109107
end
110108

111109
def exploit
@@ -121,6 +119,7 @@ def exploit
121119

122120
unless datastore['URI'].blank?
123121
serveruri = datastore['URI']
122+
(datastore['RHOST'], datastore['RPORT']) = serveruri.sub(/druby:\/\//i, '').split(':')
124123
else
125124
serveruri = "druby://#{datastore['RHOST']}:#{datastore['RPORT']}"
126125
end

0 commit comments

Comments
 (0)