Fixup on checkpoint firewall module

get() should get get_once() (intent is to get 4 bytes,
not timeout after 4 seconds), no need to escape equals
signs in regexes, no need to newline the unexpected
responses.
unstable
Tod Beardsley 2011-12-21 11:21:46 -06:00
parent f9471d6009
commit ed4c6ded2c
1 changed files with 3 additions and 3 deletions

View File

@ -51,19 +51,19 @@ class Metasploit3 < Msf::Auxiliary
sock.put("\x51\x00\x00\x00")
sock.put("\x00\x00\x00\x21")
res = sock.get(4)
res = sock.get_once(4)
if (res == "Y\x00\x00\x00")
print_good("Appears to be a CheckPoint Firewall...")
sock.put("\x00\x00\x00\x0bsecuremote\x00")
res = sock.get_once
if (res =~ /CN\=(.+),O\=(.+)\./i)
if (res =~ /CN=(.+),O=(.+)\./i)
fw_hostname = $1
sc_hostname = $2
print_good("Firewall Host: #{fw_hostname}")
print_good("SmartCenter Host: #{sc_hostname}")
end
else
print_error("Unexpected response:\r\n#{res.inspect}")
print_error("Unexpected response: '#{res.inspect}'")
end
report_info(fw_hostname,sc_hostname)