File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,12 @@ def run_host(ip)
36
36
if datastore [ 'TARGET_URI' ]
37
37
test_path = normalize_uri ( datastore [ 'TARGET_URI' ] )
38
38
result = check_url ( test_path )
39
- handle_result ( test_path , result ) if result
40
- return
41
- elsif datastore [ 'TARGET_URIS_FILE' ]
39
+ if result
40
+ handle_result ( test_path , result )
41
+ return
42
+ end
43
+ end
44
+ if datastore [ 'TARGET_URIS_FILE' ] and datastore [ 'TARGET_URIS_FILE' ] . length > 0
42
45
File . open ( datastore [ 'TARGET_URIS_FILE' ] , 'rb' ) . each_line do |line |
43
46
test_uri = line . chomp
44
47
test_path = normalize_uri ( test_uri )
@@ -48,8 +51,8 @@ def run_host(ip)
48
51
return
49
52
end
50
53
end
51
- else
52
- fail_with "Either TARGET_URI or TARGET_URIS_FILE must be specified."
54
+ elsif not datastore [ 'TARGET_URI' ]
55
+ fail_with ( Failure :: BadConfig , "Either TARGET_URI or TARGET_URIS_FILE must be specified." )
53
56
end
54
57
end
55
58
You can’t perform that action at this time.
0 commit comments