Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Requires: nmap
- TIMESTAMP=$(date +"%Y%m%d%M")
- TARGETS=( ) # E.g. TARGETS=( 1.0.0.1 1.1.1.1 )
- for TARGET in "${TARGETS[@]}"
- do
- echo "Begin scan: ${TARGET}" | tee -a nmap_${TIMESTAMP}.log
- # -sT: scan TCP, -sU: scan UDP, -p0-65535: scan ports 0-65535, -v: verbose; -Pn can be added to scan even when unresponsive to nmap "ping"
- nmap -p0-65535 -sT -sU -v ${TARGET} | tee -a nmap_${TIMESTAMP}.log
- echo "End scan: ${TARGET}" | tee -a nmap_${TIMESTAMP}.log
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement