Skip to content

Commit

Permalink
Land rapid7#5632, mozilla_reduceright nil fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MSadek-r7 committed Jul 1, 2015
2 parents 399b3d2 + 3632cc4 commit 1c5abec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/exploits/windows/browser/mozilla_reduceright.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,21 @@ def junk(n=4)
def on_request_uri(cli, request)
agent = request.headers['User-Agent']
if agent !~ /Firefox\/3\.6\.(16|17)/
print_error("This browser is not supported: #{agent.to_s}")
print_error("This browser is not supported: #{agent}")
send_not_found(cli)
return
end

my_target = target
if my_target.name == 'Automatic'
if agent =~ /NT 5\.1/ and agent =~ /Firefox\/3\.6\.16/
if agent =~ /NT 5\.1/ && agent =~ /Firefox\/3\.6\.16/
my_target = targets[1]
elsif agent =~ /NT 6\.1/ and agent =~ /Firefox\/3\.6\.16/
elsif agent =~ /NT 6\.[01]/ && agent =~ /Firefox\/3\.6\.16/
my_target = targets[2]
else
print_error("This browser is not a viable target: #{agent}")
send_not_found(cli)
return
end
end

Expand Down

0 comments on commit 1c5abec

Please sign in to comment.