Fix errors printing
parent
c97cd75beb
commit
4b4b24b79d
|
@ -76,7 +76,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
}
|
||||
})
|
||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
|
||||
print_error("#{rhost}:#{rport} - Failed to connect to the web server")
|
||||
vprint_error("#{peer} - Failed to connect to the web server")
|
||||
return Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
|
@ -109,7 +109,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
}
|
||||
})
|
||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
|
||||
print_error("#{rhost}:#{rport} - Failed to connect to the web server")
|
||||
vprint_error("#{peer} - Failed to connect to the web server")
|
||||
return nil
|
||||
end
|
||||
vprint_status("Sent command #{cmd}")
|
||||
|
@ -197,17 +197,17 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
res = request(cmd)
|
||||
|
||||
unless res
|
||||
fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload")
|
||||
fail_with(Failure::Unknown, "#{peer} - Unable to execute payload")
|
||||
end
|
||||
|
||||
print_status("#{rhost}:#{rport} - Blind Exploitation - unknown exploitation state")
|
||||
print_status("#{peer} - Blind Exploitation - unknown exploitation state")
|
||||
return
|
||||
end
|
||||
|
||||
@pl = generate_payload_exe
|
||||
|
||||
unless @pl
|
||||
fail_with(Failure::BadConfig, "#{rhost}:#{rport} - Please set payload before to run exploit.")
|
||||
fail_with(Failure::BadConfig, "#{peer} - Please set payload before to run exploit.")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue