heartbleed - Better output on wrong jabber domain and add. nil? check
parent
2de210f1c3
commit
856ad7e83d
|
@ -184,10 +184,14 @@ class Metasploit3 < Msf::Auxiliary
|
|||
sock.put(msg)
|
||||
# get first response with id
|
||||
res = sock.get_once
|
||||
return nil if res.nil? # SSL not supported
|
||||
if res.nil? || res =~ /stream:error/
|
||||
# check for unknown host error message
|
||||
print_error("#{peer} - Jabber host unknown. Please try changing the XMPPDOMAIN option.") if res =~ /<host-unknown/
|
||||
return nil
|
||||
end
|
||||
# get next part of the message
|
||||
res = sock.get_once
|
||||
return nil if res =~ /stream:error/ || res !~ /starttls/i
|
||||
return nil if res.nil? || res =~ /stream:error/ || res !~ /starttls/i
|
||||
msg = "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"
|
||||
sock.put(msg)
|
||||
sock.get_once
|
||||
|
|
Loading…
Reference in New Issue