parent
9e2285619e
commit
1f452aab48
|
@ -203,26 +203,26 @@ class Metasploit3 < Msf::Auxiliary
|
|||
end
|
||||
|
||||
def tls_jabber
|
||||
sock.put( jabber_connect_msg(datastore['XMPPDOMAIN']) )
|
||||
sock.put(jabber_connect_msg(datastore['XMPPDOMAIN']))
|
||||
res = sock.get
|
||||
if res && res =~ /host-unknown/
|
||||
if res && res.include?('host-unknown')
|
||||
jabber_host = res.match(/ from='([\w.]*)' /)
|
||||
if jabber_host && jabber_host[1]
|
||||
disconnect
|
||||
connect
|
||||
vprint_status("#{peer} - Connecting with autodetected remote XMPP hostname: #{jabber_host[1]}...")
|
||||
sock.put( jabber_connect_msg(jabber_host[1]) )
|
||||
sock.put(jabber_connect_msg(jabber_host[1]))
|
||||
res = sock.get
|
||||
end
|
||||
end
|
||||
if res.nil? || res =~ /stream:error/ || res !~ /<starttls xmlns=['"]urn:ietf:params:xml:ns:xmpp-tls['"]/
|
||||
vprint_error("#{peer} - Jabber host unknown. Please try changing the XMPPDOMAIN option.") if res && res =~ /<host-unknown/
|
||||
if res.nil? || res.include?('stream:error') || res !~ /<starttls xmlns=['"]urn:ietf:params:xml:ns:xmpp-tls['"]/
|
||||
vprint_error("#{peer} - Jabber host unknown. Please try changing the XMPPDOMAIN option.") if res && res.include?('host-unknown')
|
||||
return nil
|
||||
end
|
||||
msg = "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>"
|
||||
sock.put(msg)
|
||||
res = sock.get
|
||||
return nil if res.nil? || res !~ /<proceed/
|
||||
return nil if res.nil? || !res.include?('<proceed')
|
||||
res
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue