Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save briantissue/d0243549e58f6cd01660128f1f955dc4 to your computer and use it in GitHub Desktop.
Save briantissue/d0243549e58f6cd01660128f1f955dc4 to your computer and use it in GitHub Desktop.
NMAP Scans For Firewalls Check
#!/bin/bash
# Written by Brian Tissue May 2021
> nmapresults.txt
for HOST in `cat hosts_scan|grep -v ^#`; do echo ${HOST}; nmap -v ${HOST} | grep -i ${HOST} | grep -i open ; done >> /home/scanner/nmapresults.txt
/usr/sbin/sendmail [email protected] < /home/scanner/nmapresults.txt
/usr/sbin/sendmail [email protected] < /home/scanner/nmapresults.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment