better error handling for the user
parent
2ef2f9b47c
commit
ab42cb1bff
|
@ -62,6 +62,10 @@ class Metasploit3 < Msf::Auxiliary
|
|||
return Exploit::CheckCode::Safe
|
||||
end
|
||||
|
||||
if resp.body =~ /404<\/span> Category not found/
|
||||
return Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
version = /#{front_marker}(.*)#{back_marker}/.match(resp.body)
|
||||
|
||||
if !version
|
||||
|
@ -95,6 +99,10 @@ class Metasploit3 < Msf::Auxiliary
|
|||
fail_with("Server did not respond in an expected way. Verify the IP address.")
|
||||
end
|
||||
|
||||
if resp.body =~ /404<\/span> Category not found/
|
||||
fail_with("The category ID was invalid. Please try again with a valid category ID")
|
||||
end
|
||||
|
||||
file = /#{front_marker}(.*)#{back_marker}/.match(resp.body)
|
||||
|
||||
if !file
|
||||
|
|
Loading…
Reference in New Issue