From dc20ef0754ea75b0b18ca859c574b136d82156d5 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Fri, 3 Apr 2015 17:10:07 +0100 Subject: [PATCH] Increases the timeout values - Ref #797 --- example.conf.json | 4 ++-- lib/common/browser.rb | 4 ++-- spec/lib/common/browser_spec.rb | 2 +- spec/samples/conf/browser.conf.json | 4 ++-- spec/samples/conf/browser.conf_proxy.json | 4 ++-- spec/samples/conf/browser.conf_proxy_auth.json | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/example.conf.json b/example.conf.json index eafb977e..ac4ef037 100644 --- a/example.conf.json +++ b/example.conf.json @@ -10,9 +10,9 @@ "cache_ttl": 600, // 10 minutes, at this time the cache is cleaned before each scan. If this value is set to 0, the cache will be disabled - "request_timeout": 4, // 4s + "request_timeout": 60, // 1min - "connect_timeout": 2, // 2s + "connect_timeout": 5, // 5s "max_threads": 20 } diff --git a/lib/common/browser.rb b/lib/common/browser.rb index 1bdd2f6f..88e1aca5 100644 --- a/lib/common/browser.rb +++ b/lib/common/browser.rb @@ -73,8 +73,8 @@ class Browser @max_threads = 20 # 10 minutes, at this time the cache is cleaned before each scan. If this value is set to 0, the cache will be disabled @cache_ttl = 600 - @request_timeout = 4 # 4s - @connect_timeout = 2 # 2s + @request_timeout = 60 # 60s + @connect_timeout = 5 # 5s @user_agent = "WPScan v#{WPSCAN_VERSION} (http://wpscan.org)" end diff --git a/spec/lib/common/browser_spec.rb b/spec/lib/common/browser_spec.rb index beb0b019..b8239ad7 100644 --- a/spec/lib/common/browser_spec.rb +++ b/spec/lib/common/browser_spec.rb @@ -130,7 +130,7 @@ describe Browser do headers: { 'User-Agent' => 'SomeUA' }, ssl_verifypeer: false, ssl_verifyhost: 0, cookiejar: cookie_jar, cookiefile: cookie_jar, - timeout: 4, connecttimeout: 2, + timeout: 60, connecttimeout: 5, maxredirs: 3, referer: nil } diff --git a/spec/samples/conf/browser.conf.json b/spec/samples/conf/browser.conf.json index 3a7bd76c..146b4d22 100644 --- a/spec/samples/conf/browser.conf.json +++ b/spec/samples/conf/browser.conf.json @@ -1,7 +1,7 @@ { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20100101 Firefox/9.0", "cache_ttl": 600, - "request_timeout": 4, - "connect_timeout": 2, + "request_timeout": 60, + "connect_timeout": 5, "max_threads": 20 } diff --git a/spec/samples/conf/browser.conf_proxy.json b/spec/samples/conf/browser.conf_proxy.json index 6ebc0388..c14520ed 100644 --- a/spec/samples/conf/browser.conf_proxy.json +++ b/spec/samples/conf/browser.conf_proxy.json @@ -2,6 +2,6 @@ "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0) Gecko/20100101 Firefox/11.0", "proxy": "127.0.0.1:3038", "cache_ttl": 300, - "request_timeout": 4, - "connect_timeout": 2 + "request_timeout": 60, + "connect_timeout": 5 } diff --git a/spec/samples/conf/browser.conf_proxy_auth.json b/spec/samples/conf/browser.conf_proxy_auth.json index 4d9f52f5..87a7c8a0 100644 --- a/spec/samples/conf/browser.conf_proxy_auth.json +++ b/spec/samples/conf/browser.conf_proxy_auth.json @@ -3,6 +3,6 @@ "proxy": "127.0.0.1:3038", "proxy_auth": "user:pass", "cache_ttl": 300, - "request_timeout": 4, - "connect_timeout": 2 + "request_timeout": 60, + "connect_timeout": 5 }