[KB Dump] Ansible, Jupyter, and Nmap Oh my

1 Like

How to run:

#!/bin/bash

# make temp directory
fu=$(mktemp -d) 

# web get file and store in temp directory as network_scanner.ipynb
wget https://gist.githubusercontent.com/denzuko/ef5745e2859efce64ce61a5d378cf9a4/raw/910d6b59cada867045e95e251bf953922228893c/network_scanner.ipynb -O$fu/network_scanner.ipynb

# deploy jupyter notebook with ansible kernel pre-installed
docker run -p 8899:8888 -v $fu:/home/notebook/notebook/scanner benthomasson/ansible-jupyter-kernel  jupyter notebook --ip 0.0.0.0 --NotebookApp.token='' --NotebookApp.password='' /home/notebook/notebook/scanner/network_scanner.ipynb

# open the web ui
open http://localhost:8899 || xdg-open http://localhost:8899 || start http://localhost:8899