Skip to content

Commit d2df323

Browse files
committed
Land rapid7#1955 - mozilla_mchannel.rb undefined agent variable
2 parents 223807d + 996171b commit d2df323

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/exploits/windows/browser/mozilla_mchannel.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ def on_request_uri(cli, request)
110110
js_ppppr = rand_text_alpha(rand(10) + 5)
111111
js_filler = rand_text_alpha(rand(10) + 5)
112112

113+
agent = request.headers['User-Agent']
114+
113115
# Set target manually or automatically
114116
my_target = target
115117
if my_target.name == 'Automatic'
116-
agent = request.headers['User-Agent']
117118
if agent =~ /NT 5\.1/ and agent =~ /Firefox\/3\.6\.16/
118119
my_target = targets[1]
119120
elsif agent =~ /NT 6\.1/ and agent =~ /Firefox\/3\.6\.16/

0 commit comments

Comments
 (0)