From 5286df9132fe98f758298f4277462f2cd266b11a Mon Sep 17 00:00:00 2001 From: Slava Date: Thu, 9 Apr 2015 16:13:25 -0300 Subject: [PATCH 1/2] Fix phantomjs problem with non ssl3 sites By default phantoms JS use SSLv3 only: ` --ssl-protocol= Sets the SSL protocol (supported protocols: 'SSLv3' (default), 'SSLv2', 'TLSv1', 'any')` For this reason it doesn't work with non ssl3 sites like https://mail.ru. --- src/drivers/phantomjs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/phantomjs/Dockerfile b/src/drivers/phantomjs/Dockerfile index 42d120a67..73ed7c9db 100644 --- a/src/drivers/phantomjs/Dockerfile +++ b/src/drivers/phantomjs/Dockerfile @@ -26,4 +26,4 @@ RUN wappalyzer/bin/wappalyzer-links wappalyzer WORKDIR wappalyzer/src/drivers/phantomjs -ENTRYPOINT ["/usr/local/phantomjs/bin/phantomjs", "--load-images=false", "--ignore-ssl-errors=yes", "driver.js"] +ENTRYPOINT ["/usr/local/phantomjs/bin/phantomjs", "--load-images=false", "--ignore-ssl-errors=yes", "--ssl-protocol=any", "driver.js"] From 69eafc4f6901a886e52e6726e74e63004918357b Mon Sep 17 00:00:00 2001 From: Slava Date: Thu, 9 Apr 2015 17:15:49 -0300 Subject: [PATCH 2/2] Add --resource-timeout argument Sometimes 9000 ms isn't enough --- src/drivers/phantomjs/driver.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/drivers/phantomjs/driver.js b/src/drivers/phantomjs/driver.js index 8cce11eb4..194b091fb 100644 --- a/src/drivers/phantomjs/driver.js +++ b/src/drivers/phantomjs/driver.js @@ -2,6 +2,7 @@ var url, originalUrl, + resourceTimeout = 9000, args = [], debug = false; @@ -12,6 +13,9 @@ case '--verbose': debug = true; + break; + case '--resource-timeout': + resourceTimeout = arg; break; default: url = originalUrl = arg; @@ -90,7 +94,7 @@ page.settings.loadImages = false; page.settings.userAgent = 'Mozilla/5.0 (compatible; Wappalyzer; +https://github.com/AliasIO/Wappalyzer)'; - page.settings.resourceTimeout = 9000; + page.settings.resourceTimeout = resourceTimeout; page.onConsoleMessage = function(message) { wappalyzer.log(message);