Skip to content

Commit 1b9d45e

Browse files
committed
Test for subdom_list existence first
Otherwise, you get ```` [11/09/2012 14:50:38] [e(0)] core: Error running against host 173.236.237.136: can't convert nil into String ```` Other than that, looks good. [Fixes rapid7#851]
1 parent 171ebe1 commit 1b9d45e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/auxiliary/scanner/http/vhost_scanner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def initialize(info = {})
5151
end
5252

5353
def run_host(ip)
54-
if ::File.file?(datastore['SUBDOM_LIST'])
54+
if datastore['SUBDOM_LIST'] and ::File.file?(datastore['SUBDOM_LIST'])
5555
valstr = IO.readlines(datastore['SUBDOM_LIST']).map {
5656
|e| e.gsub(".#{datastore['DOMAIN']}", "").chomp
5757
}

0 commit comments

Comments
 (0)