Skip to content

Commit 5ad3cc6

Browse files
committed
Make FILEPATH mandatory
1 parent b1b10cf commit 5ad3cc6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

modules/auxiliary/admin/http/netflow_file_download.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,12 @@ def initialize(info={})
3838
Opt::RPORT(8080),
3939
OptString.new('TARGETURI',
4040
[ true, "The base path to NetFlow Analyzer", '/netflow' ]),
41-
OptString.new('FILEPATH', [false, 'Path of the file to download (escape Windows paths with 4 back slashes)', '/etc/passwd']),
41+
OptString.new('FILEPATH', [true, 'Path of the file to download (escape Windows paths with 4 back slashes)', '/etc/passwd']),
4242
], self.class)
4343
end
4444

4545

4646
def run
47-
# No point to continue if filepath is not specified
48-
if datastore['FILEPATH'].nil? || datastore['FILEPATH'].empty?
49-
print_error("Please supply the path of the file you want to download.")
50-
return
51-
end
52-
5347
# Create request
5448
begin
5549
print_status("#{peer} - Downloading file #{datastore['FILEPATH']}")

0 commit comments

Comments
 (0)