Added Dockerfile to PhantomJS driver, exit PhantomJS on error

main
Elbert Alias 10 years ago
parent d2e798b3ca
commit ea4d887a12

@ -2513,6 +2513,17 @@
"implies": "Windows Server",
"website": "www.iis.net"
},
"INFOnline": {
"cats": [
10
],
"env": [
"^szmvars$",
"^iam_data$"
],
"script": "^https?://(?:[^/]+\\.)?i(?:oam|v)wbox\\.de/",
"website": "infonline.de"
},
"IPB": {
"cats": [
2
@ -2547,17 +2558,6 @@
},
"website": "impresspages.org"
},
"INFOnline": {
"cats": [
10
],
"env": [
"^szmvars$",
"^iam_data$"
],
"script": "^https?://(?:[^/]+\\.)?i(?:oam|v)wbox\\.de/",
"website": "infonline.de"
},
"InProces": {
"cats": [
1

@ -0,0 +1,29 @@
FROM phusion/baseimage
MAINTAINER Elbert Alias <elbert@alias.io>
ENV DEBIAN_FRONTEND noninteractive
RUN \
apt-get update && apt-get install -y \
libfreetype6 \
libfontconfig \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /usr/local
# PhantomJS
RUN \
mkdir phantomjs && \
curl -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar xvjC phantomjs --strip 1
# Wappalyzer
RUN \
mkdir wappalyzer && \
curl -sSL https://github.com/AliasIO/Wappalyzer/archive/master.tar.gz | tar xzC wappalyzer --strip 1
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"]

@ -105,7 +105,7 @@
return;
}
if ( response.stage === 'end' && response.contentType.indexOf('text/html') !== -1 ) {
if ( response.stage === 'end' && response.status === 200 && response.contentType.indexOf('text/html') !== -1 ) {
response.headers.forEach(function(header) {
headers[header.name.toLowerCase()] = header.value;
});
@ -116,10 +116,9 @@
page.open(url, function(status) {
var html, environmentVars;
if ( status === 'fail' ) {
return;
}
wappalyzer.log('page.open: ' + status);
if ( status === 'success' ) {
html = page.content;
if ( html.length > 50000 ) {
@ -146,6 +145,7 @@
headers: headers,
env: environmentVars
});
}
phantom.exit();
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB