Skip to content

Commit

Permalink
Land #2521, nil fix for ms13_069
Browse files Browse the repository at this point in the history
  • Loading branch information
egypt committed Oct 14, 2013
2 parents 75aaded + 15e8c3b commit 29ae6be
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions modules/exploits/windows/browser/ms13_069_caret.rb
Expand Up @@ -44,7 +44,6 @@ def initialize(info={})
'Platform' => 'win',
'Targets' =>
[
[ 'Automatic', {} ],
[
# Win 7 target on hold until we have a stable custom spray for it
'IE 8 on Windows XP SP3',
Expand Down Expand Up @@ -84,24 +83,7 @@ def initialize(info={})


def get_target(agent)
return target if target.name != 'Automatic'

nt = agent.scan(/Windows NT (\d\.\d)/).flatten[0] || ''
ie = agent.scan(/MSIE (\d)/).flatten[0] || ''

ie_name = "IE #{ie}"

case nt
when '5.1'
os_name = 'Windows XP SP3'
end

targets.each do |t|
if (!ie.empty? and t.name.include?(ie_name)) and (!nt.empty? and t.name.include?(os_name))
return t
end
end

return targets[0] if agent =~ /MSIE 8\.0/ and agent =~ /Windows NT 5\.1/
nil
end

Expand Down

0 comments on commit 29ae6be

Please sign in to comment.