Skip to content

Commit 1702cf2

Browse files
committed
Use TARGETURI
1 parent 3c27520 commit 1702cf2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

modules/auxiliary/scanner/http/svn_wcdb_scanner.rb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,13 @@ def initialize
3535

3636
register_advanced_options(
3737
[
38-
OptString.new('BASE_PATH', [false, 'Path to the directory with the .svn folder.', nil])
38+
OptString.new('TARGETURI', [false, 'Base path to the .svn directory', '/.svn/'])
3939
], self.class)
4040
end
4141

4242
def run_host(ip)
43-
if datastore['BASE_PATH']
44-
45-
get_wcdb(Rex::FileUtils.normalize_unix_path(datastore['BASE_PATH'] + '/.svn/wc.db'))
46-
else
47-
get_wcdb('/.svn/wc.db')
48-
end
43+
base_path = target_uri.path
44+
get_wcdb(normalize_uri(base_path, 'wc.db'))
4945
end
5046

5147
def get_wcdb(path)

0 commit comments

Comments
 (0)