Fixes #3571, normalize 2k3r2 and fix language defaulting
git-svn-id: file:///home/svn/framework3/trunk@11614 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
e1e35ea15b
commit
ae33e3ac71
|
@ -758,13 +758,11 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
print_status("Automatically detecting the target...")
|
||||
fprint = smb_fingerprint()
|
||||
|
||||
print_status("Fingerprint: #{fprint['os']} #{fprint['sp']} - lang:#{fprint['lang']}")
|
||||
print_status("Fingerprint: #{fprint['os']} - #{fprint['sp']} - lang:#{fprint['lang']}")
|
||||
|
||||
# Bail early on unknown OS
|
||||
if(fprint['os'] == 'Unknown')
|
||||
print_status("No matching target")
|
||||
disconnect
|
||||
return
|
||||
raise RuntimeError, "No matching target"
|
||||
end
|
||||
|
||||
# Windows 2000 is mostly universal
|
||||
|
@ -782,6 +780,11 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
mytarget = self.targets[5]
|
||||
end
|
||||
|
||||
# Windows 2003 R2 is treated the same as 2003
|
||||
if(fprint['os'] == 'Windows 2003 R2')
|
||||
fprint['os'] = 'Windows 2003'
|
||||
end
|
||||
|
||||
# Service Pack match must be exact
|
||||
if((not mytarget) and fprint['sp'].index('+'))
|
||||
print_error("Could not determine the exact service pack")
|
||||
|
@ -793,7 +796,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
# Language Pack match must be exact or we default to English
|
||||
if((not mytarget) and fprint['lang'] == 'Unknown')
|
||||
print_status("We could not detect the language pack, defaulting to English")
|
||||
fprint['lang'] == 'English'
|
||||
fprint['lang'] = 'English'
|
||||
end
|
||||
|
||||
# Normalize the service pack string
|
||||
|
@ -809,9 +812,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
if(not mytarget)
|
||||
print_error("No matching target")
|
||||
disconnect
|
||||
return
|
||||
raise RuntimeError, "No matching target"
|
||||
end
|
||||
|
||||
print_status("Selected Target: #{mytarget.name}")
|
||||
|
|
Loading…
Reference in New Issue