diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5a9f30c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:latest +MAINTAINER docker@stubdal.net + +RUN apt-get update && apt-get upgrade -y +RUN apt-get install -y lighttpd perl git golang libjson-perl libdatetime-perl libwww-mechanize-perl cron +RUN mkdir /root/sslscan && mkdir /var/www/html/json && mkdir ~/git && cd ~/git && git clone https://github.com/ssllabs/ssllabs-scan && git clone https://github.com/nfcring/sslscan && ls sslscan +ADD index.html /var/www/html/. +ADD start.sh /root/. +RUN chmod 644 /var/www/html/* +RUN cd ~/git/ssllabs-scan && go build ssllabs-scan-v3.go +RUN cp ~/git/sslscan/sslscan.css /var/www/html/. +RUN chmod +x /root/start.sh +RUN touch /var/log/cron.log +RUN apt-get install -y rsyslog +ADD sslscan_cron /etc/cron.d/. +ADD hosts.txt /root/git/sslscan/hosts.txt +RUN chmod 644 /etc/cron.d/sslscan_cron +ADD runscan.sh /root/. +RUN chmod +x /root/runscan.sh +CMD /root/start.sh + + + diff --git a/hosts.txt b/hosts.txt new file mode 100644 index 0000000..1142736 --- /dev/null +++ b/hosts.txt @@ -0,0 +1 @@ +github.com diff --git a/index.html b/index.html new file mode 100644 index 0000000..8892cad --- /dev/null +++ b/index.html @@ -0,0 +1,10 @@ + + + + + SSL security scan + + +

First scan has not completed yet. come back in a few minutes.

+ + diff --git a/runscan.sh b/runscan.sh new file mode 100644 index 0000000..b072b47 --- /dev/null +++ b/runscan.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cd ~/git/sslscan +perl scanssl-beta.pl +cp sslscan.html /var/www/html/index.html +cp -R /root/git/sslscan/json/ /var/www/html/. +chown -R www-data:www-data /var/www/html diff --git a/sslscan_cron b/sslscan_cron new file mode 100644 index 0000000..6685f23 --- /dev/null +++ b/sslscan_cron @@ -0,0 +1,5 @@ +# m h dom mon dow user command +#run scan at 01:00 every night +0 01 * * * root perl /root/runscan.sh + +# empty line diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..44060f7 --- /dev/null +++ b/start.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# start syslog +rsyslogd +# start web server +/usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf +# run cron - which runs scan from /etc/cron.d/sslscan_cron +cron && tail -f /var/log/syslog