@@ -24,7 +24,9 @@ def initialize(info = {})
24
24
OptInt . new ( 'MAX_MINUTES' , [ true , 'The maximum number of minutes to spend on each URL' , 5 ] ) ,
25
25
OptInt . new ( 'MAX_THREADS' , [ true , 'The maximum number of concurrent requests' , 4 ] ) ,
26
26
OptString . new ( 'USERNAME' , [ false , 'The HTTP username to specify for authentication' ] ) ,
27
- OptString . new ( 'PASSWORD' , [ false , 'The HTTP password to specify for authentication' ] )
27
+ OptString . new ( 'PASSWORD' , [ false , 'The HTTP password to specify for authentication' ] ) ,
28
+ OptString . new ( 'DOMAIN' , [ true , 'The domain to use for windows authentication' , 'WORKSTATION' ] )
29
+
28
30
] , self . class
29
31
)
30
32
@@ -123,6 +125,7 @@ def run
123
125
if datastore [ 'USERNAME' ] and datastore [ 'USERNAME' ] != ''
124
126
t [ :username ] = datastore [ 'USERNAME' ] . to_s
125
127
t [ :password ] = datastore [ 'PASSWORD' ] . to_s
128
+ t [ :domain ] = datastore [ 'DOMAIN' ] . to_s
126
129
end
127
130
128
131
if datastore [ 'HTTPCookie' ]
@@ -282,7 +285,8 @@ def crawler_options(t)
282
285
end
283
286
284
287
opts [ :username ] = t [ :username ] || ''
285
- opts [ :password ] = t [ :password ] || ''
288
+ opts [ :password ] = t [ :password ] || ''
289
+ opts [ :domain ] = t [ :domain ] || 'WORKSTATION'
286
290
287
291
opts
288
292
end
0 commit comments