Display message when no response received

unstable
Chris John Riley 2012-11-08 11:59:13 +01:00
parent fc03fbe881
commit da6bf29699
1 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class Metasploit3 < Msf::Auxiliary
connect_udp connect_udp
print_status("Sending deregistration packet to: #{conn_string}") print_status("Sending deregistration packet to: #{conn_string}")
print_status("Using SIP proxy #{sphost}:#{spport}") if sphost print_status("Using SIP proxy #{sphost}:#{spport}") if route
req = "REGISTER sip:#{dom} SIP/2.0" + "\r\n" req = "REGISTER sip:#{dom} SIP/2.0" + "\r\n"
req << route if route req << route if route
@ -91,8 +91,12 @@ class Metasploit3 < Msf::Auxiliary
end end
def parse_reply(pkt) def parse_reply(pkt)
# parse response to check if the ext was successfully de-registered
return if not pkt[1] if not pkt[1]
print_error("No response received from remote host")
return
end
if(pkt[1] =~ /^::ffff:/) if(pkt[1] =~ /^::ffff:/)
pkt[1] = pkt[1].sub(/^::ffff:/, '') pkt[1] = pkt[1].sub(/^::ffff:/, '')