Skip to content

Commit 996171b

Browse files
RuslaideeminRuslaideemin
authored andcommitted
mozilla_mchannel.rb undefined agent variable
If the TARGET is chosen instead of using the default automatic, the agent variable will be undefined, which causes the exploit to fail.
1 parent 69c2501 commit 996171b

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)