I use nmap all the time at work and recently came across rainmap-lite which is an amazing web interface for nmap that allows you to easily schedule and email scan results. I wanted to be able to share it with a class I am teaching so I did what I have been doing lately and put it into a docker container:
Running it is as simple as:
docker run -ti -p 8080:8080 --name rainmap jgamblin/rainmapThen access:
Here is the DockerFile:
RUN apt-get update && apt-get install sqlite3 git nmap python-pip -y
RUN pip install --upgrade pip
RUN pip install lxml
RUN pip install Django
RUN git clone https://github.com/cldrn/rainmap-lite
ADD run.sh /rainmap-lite/rainmap-lite/run.sh
RUN chmod 777 /rainmap-lite/rainmap-lite/run.sh
Here is the run.sh:
sed -i "s/8000/8080/g" "nmaper-cronjob.py"
echo What is your public IP address?
sed -i "s/127.0.0.1/$ip/g" "nmaper-cronjob.py"
echo What is your SMTP user name?
sed -i "email@example.com/$user/g" "nmaper-cronjob.py"
echo What is your SMTP password?
sed -i "s/yourpassword/$pass/g" "nmaper-cronjob.py"
echo What is your SMTP address?
sed -i "s/smtp.gmail.com/$smtp/g" "nmaper-cronjob.py"
python manage.py migrate
python manage.py loaddata nmapprofiles
python manage.py createsuperuser
python manage.py runserver 0.0.0.0:8080 &