Skip to content

Commit 4e41e87

Browse files
RuslaideeminRuslaideemin
authored andcommitted
mozilla_reduceright.rb - fix regex error.
[] is character class, and will match on 1, 6, 7, and |. Where as (16|17) will match on either 16, or 17. irb(main):053:0> y = /Firefox\/3\.6\.[16|17]/ => /Firefox\/3\.6\.[16|17]/ irb(main):054:0> x = "Firefox/3.6.13" => "Firefox/3.6.13" irb(main):055:0> x =~ y => 0 irb(main):056:0> y = /Firefox\/3\.6\.(16|17)/ => /Firefox\/3\.6\.(16|17)/ irb(main):057:0> x =~ y => nil
1 parent 69c2501 commit 4e41e87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/exploits/windows/browser/mozilla_reduceright.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def junk(n=4)
8888

8989
def on_request_uri(cli, request)
9090
agent = request.headers['User-Agent']
91-
if agent !~ /Firefox\/3\.6\.[16|17]/
91+
if agent !~ /Firefox\/3\.6\.(16|17)/
9292
print_error("This browser is not supported: #{agent.to_s}")
9393
send_not_found(cli)
9494
return

0 commit comments

Comments
 (0)