Skip to content

Commit 5dfb5d5

Browse files
author
Tod Beardsley
committed
Switch get_cookies to get_cookies_parsed
Am I doing it right? See rapid7#9333
1 parent 216d00e commit 5dfb5d5

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

modules/auxiliary/scanner/http/epmp1000_cmd_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def do_login(user, pass)
152152
)
153153

154154
if good_response
155-
sysauth_value = res.get_cookies.scan(/((.*)[$ ])/).flatten[0] || ''
155+
sysauth_value = res.get_cookies_parsed.scan(/((.*)[$ ])/).flatten[0] || ''
156156

157157
cookie1 = "#{sysauth_value}; " + "globalParams=%7B%22dashboard%22%3A%7B%22refresh_rate%22%3A%225%22%7D%2C%22#{user}%22%3A%7B%22refresh_rate%22%3A%225%22%7D%7D"
158158

@@ -179,7 +179,7 @@ def do_login(user, pass)
179179
good_response = (
180180
res &&
181181
res.code == 200 &&
182-
res.get_cookies.scan(/(stok=(.*))/).flatten[0]
182+
res.get_cookies_parsed.scan(/(stok=(.*))/).flatten[0]
183183
)
184184

185185
if good_response

modules/exploits/linux/http/epmp1000_get_chart_cmd_shell.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def login(user, pass)
127127
}
128128
)
129129

130-
cookies = res.get_cookies
130+
cookies = res.get_cookies_parsed
131131
good_response = (
132132
res &&
133133
res.code == 200 &&
@@ -158,7 +158,7 @@ def login(user, pass)
158158
}
159159
)
160160

161-
cookies = res.get_cookies
161+
cookies = res.get_cookies_parsed
162162
good_response = (
163163
res &&
164164
res.code == 200 &&

modules/exploits/linux/http/epmp1000_ping_cmd_shell.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def login(user, pass)
127127
}
128128
)
129129

130-
cookies = res.get_cookies
130+
cookies = res.get_cookies_parsed
131131
good_response = (
132132
res &&
133133
res.code == 200 &&
@@ -157,7 +157,7 @@ def login(user, pass)
157157
}
158158
)
159159

160-
cookies = res.get_cookies
160+
cookies = res.get_cookies_parsed
161161
good_response = (
162162
res &&
163163
res.code == 200 &&

0 commit comments

Comments
 (0)