add suggestion when auto-targeting fails, see #2022

git-svn-id: file:///home/svn/framework3/trunk@9396 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-06-02 16:29:14 +00:00
parent 7039bc3461
commit a8186ae6ae
2 changed files with 8 additions and 6 deletions

View File

@ -107,7 +107,7 @@ class Metasploit3 < Msf::Exploit::Remote
dport = datastore['RPORT'].to_i dport = datastore['RPORT'].to_i
if ((dport != 0) && (target.name =~ /Automatic/)) if ((dport != 0) && (target.name =~ /Automatic/))
print_status("Could not use automatic target when the remote port is given"); print_error("Unable to use automatic targeting when RPORT is given");
return return
end end
@ -116,7 +116,7 @@ class Metasploit3 < Msf::Exploit::Remote
dport = dcerpc_endpoint_find_tcp(datastore['RHOST'], '50abc2a4-574d-40b3-9d66-ee4fd5fba076', '5.0', 'ncacn_ip_tcp') dport = dcerpc_endpoint_find_tcp(datastore['RHOST'], '50abc2a4-574d-40b3-9d66-ee4fd5fba076', '5.0', 'ncacn_ip_tcp')
if (not dport) if (not dport)
print_status("Could not determine the RPC port used by the Microsoft DNS Server") print_error("Could not determine the RPC port used by the Microsoft DNS Server")
return return
end end
@ -148,7 +148,7 @@ class Metasploit3 < Msf::Exploit::Remote
end end
if (not mytarget) if (not mytarget)
print_status("There is no available target for this locale") print_error("There is no available target for this locale")
return return
end end
else else

View File

@ -775,14 +775,16 @@ class Metasploit3 < Msf::Exploit::Remote
# Service Pack match must be exact # Service Pack match must be exact
if((not mytarget) and fprint['sp'].index('+')) if((not mytarget) and fprint['sp'].index('+'))
print_status("Could not determine the exact service pack") print_error("Could not determine the exact service pack")
print_status("Auto-targeting failed, use 'show targets' to manually select one")
disconnect disconnect
return return
end end
# Language Pack match must be exact # Language Pack match must be exact
if((not mytarget) and fprint['lang'] == 'Unknown') if((not mytarget) and fprint['lang'] == 'Unknown')
print_status("Could not determine the exact language pack") print_error("Could not determine the exact language pack")
print_status("Auto-targeting failed, use 'show targets' to manually select one")
disconnect disconnect
return return
end end
@ -800,7 +802,7 @@ class Metasploit3 < Msf::Exploit::Remote
end end
if(not mytarget) if(not mytarget)
print_status("No matching target") print_error("No matching target")
disconnect disconnect
return return
end end