try harder, report errors better

git-svn-id: file:///home/svn/framework3/trunk@11135 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-11-25 01:28:52 +00:00
parent c8a04d8899
commit 07703eca66
1 changed files with 8 additions and 4 deletions

View File

@ -90,10 +90,6 @@ class Metasploit3 < Msf::Auxiliary
stderr_sock = nil stderr_sock = nil
end end
# Read the expected nul byte response.
buf = sock.get_once(1)
return :abort if buf != "\x00"
# NOTE: We report this here, since we are awfully convinced now that this is really # NOTE: We report this here, since we are awfully convinced now that this is really
# an rexec service. # an rexec service.
report_service( report_service(
@ -103,6 +99,14 @@ class Metasploit3 < Msf::Auxiliary
:name => 'rexec' :name => 'rexec'
) )
# Read the expected nul byte response.
buf = sock.get_once(1)
if buf != "\x00"
buf = sock.get_once(-1)
vprint_error("Result: #{buf.gsub(/[[:space:]]+/, ' ')}")
return :failed
end
# should we report a vuln here? rexec allowed w/o password?! # should we report a vuln here? rexec allowed w/o password?!
print_good("#{target_host}:#{rport}, rexec '#{user}' : '#{pass}'") print_good("#{target_host}:#{rport}, rexec '#{user}' : '#{pass}'")
start_rexec_session(rhost, rport, user, pass, buf, stderr_sock) start_rexec_session(rhost, rport, user, pass, buf, stderr_sock)