Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # Requires: nmap
  4.  
  5. TIMESTAMP=$(date +"%Y%m%d%M")
  6. TARGETS=( ) # E.g. TARGETS=( 1.0.0.1 1.1.1.1 )
  7.  
  8. for TARGET in "${TARGETS[@]}"
  9. do
  10. echo "Begin scan: ${TARGET}" | tee -a nmap_${TIMESTAMP}.log
  11. # -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"
  12. nmap -p0-65535 -sT -sU -v ${TARGET} | tee -a nmap_${TIMESTAMP}.log
  13. echo "End scan: ${TARGET}" | tee -a nmap_${TIMESTAMP}.log
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement