error on platform mismatch separately
git-svn-id: file:///home/svn/framework3/trunk@11082 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
0c4ea7908b
commit
66d0012200
|
@ -17,9 +17,8 @@ require 'zlib'
|
|||
#
|
||||
# Filter out sessions that this definitely won't work on.
|
||||
#
|
||||
vuln = false
|
||||
winver = "Unknown"
|
||||
if session.platform =~ /win32|win64/
|
||||
vuln = false
|
||||
winver = session.sys.config.sysinfo["OS"]
|
||||
affected = [ 'Windows Vista', 'Windows 7', 'Windows 2008' ]
|
||||
affected.each { |v|
|
||||
|
@ -28,13 +27,16 @@ if session.platform =~ /win32|win64/
|
|||
break
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
if not vuln
|
||||
print_error("#{winver} is not vulnerable.")
|
||||
if not vuln
|
||||
print_error("#{winver} is not vulnerable.")
|
||||
raise Rex::Script::Completed
|
||||
end
|
||||
else
|
||||
print_error("#{session.platform} is not supported.")
|
||||
raise Rex::Script::Completed
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# We have a chance to succeed, check params
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue