https://github.com/mcrmonkey/nmapdrone
https://github.com/mcrmonkey/nmapdrone
docker-container nmap
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mcrmonkey/nmapdrone
- Owner: mcrmonkey
- Created: 2016-11-07T00:54:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-01T22:13:32.000Z (over 8 years ago)
- Last Synced: 2025-05-16T22:37:18.641Z (about 1 year ago)
- Topics: docker-container, nmap
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NMAP Drone
Based on a script released by Jerry Gamblin [here](https://twitter.com/JGamblin/status/795041780014137345)
This runs an nmap scan on a list of targets and saves the results.
Subsequent scans will be compared with the last scan and if desired can be posted to slack
### *NOTE:* You must ensure that you run this script and/or container responsibly. Dont be a jerk by using this to abuse stuff. You agree that you are responsible for running this script, not anyone else.
## Data
The script is set to save its data to `/data`.
If you're running the script outside of the docker container you'll either need to change this in the script or create that directory on the machine you're running this from.
## Targets
For saftey the script's default target is localhost ( 127.0.0.1 )
You can either change the script or run it like so
```
TARGETS="192.168.0.1" go.sh
```
If you're using the docker image append the following option to your docker command:
```
-e TARGETS="192.168.0.1"
```
## Posting to Slack
You'll need:
* to setup your own bot on slack so you can get an API token pass it to the variable - `SLACK_TOKEN="xxx"`
* The channel to post in. Pass this like so: `SLACK_CHAN="channelname"`
* To enable the slack posting option. Pass the following as a variable: `SLACK_ENABLE="y"`
You can get your slack bot variable from here: https://my.slack.com/services/new/bot
You can run it direct with the following
```
SLACK_ENABLE="Y" SLACK_CHAN="channel" SLACK_TOKEN="xxxx" go.sh
```
Or via docker with the following options set:
```
-e SLACK_ENABLE="Y" -e SLACK_CHAN="channel" -e SLACK_TOKEN="xxxx"
```
# Running with docker
Run the container with the following command:
```
docker run -v /path/to/data:/data:rw -e SLACK_ENABLE="Y" -e SLACK_CHAN="channel" -e SLACK_TOKEN="xxxx" -e TARGETS="192.168.0.1" mcrmonkey/nmapdrone
```
* `-v /path/to/data:/data:rw` - If you want to preserve your scan data. `/path/to/data` is the path to the directory on your host where you want to save the data
* `-e xxxx` - These set envionment variables
# Credit
The original script was written by Jerry Gamblin ( @JGamblin on twitter and github ) and has been adapted by ant to work in a docker container
# Licence
I've not applied one.
You can do what ever you like to this version. However, I'd ask you link back here if you make something based on this.