@@ -37,13 +37,12 @@ def initialize(info = {})
3737 OptInt . new ( 'RequestTimeout' , [ false , 'The maximum number of seconds to wait for a reply' , 15 ] ) ,
3838 OptInt . new ( 'RedirectLimit' , [ false , 'The maximum number of redirects for a single request' , 5 ] ) ,
3939 OptInt . new ( 'RetryLimit' , [ false , 'The maximum number of attempts for a single request' , 5 ] ) ,
40- OptString . new ( 'UserAgent' , [ true , 'The User-Agent header to use for all requests' ,
41- "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
42- ] ) ,
40+ OptString . new ( 'UserAgent' , [ true , 'The User-Agent header to use for all requests' , Rex ::UserAgent . random ] ) ,
4341 OptString . new ( 'BasicAuthUser' , [ false , 'The HTTP username to specify for basic authentication' ] ) ,
4442 OptString . new ( 'BasicAuthPass' , [ false , 'The HTTP password to specify for basic authentication' ] ) ,
4543 OptString . new ( 'HTTPAdditionalHeaders' , [ false , "A list of additional headers to send (separated by \\ x01)" ] ) ,
4644 OptString . new ( 'HTTPCookie' , [ false , "A HTTP cookie header to send with each request" ] ) ,
45+ OptString . new ( 'SSLServerNameIndication' , [ false , 'SSL/TLS Server Name Indication (SNI)' , nil ] ) ,
4746 Opt ::SSLVersion
4847 ] , self . class
4948 )
@@ -115,6 +114,7 @@ def run
115114
116115 t . merge! ( {
117116 :vhost => vhost ,
117+ :ssl_server_name_indication => datastore [ 'SSLServerNameIndication' ] || vhost ,
118118 :host => rhost ,
119119 :port => rport ,
120120 :ssl => ssl ,
@@ -269,6 +269,7 @@ def crawler_process_page(t, page, cnt)
269269 def crawler_options ( t )
270270 opts = { }
271271 opts [ :user_agent ] = datastore [ 'UserAgent' ]
272+ opts [ :ssl_server_name_indication ] = datastore [ 'SSLServerNameIndication' ]
272273 opts [ :verbose ] = false
273274 opts [ :threads ] = max_crawl_threads
274275 opts [ :obey_robots_txt ] = false
0 commit comments