heartbleed - Better output on wrong jabber domain and add. nil? check

bug/bundler_fix
Christian Mehlmauer 2014-04-09 21:53:17 +02:00
parent 2de210f1c3
commit 856ad7e83d
No known key found for this signature in database
GPG Key ID: BCFF4FA966BC32C7
1 changed files with 6 additions and 2 deletions

View File

@ -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