This is a wrapper shell script using the nmap scripting engine to scan for systems vulnerable to petya and wannacry a cron might be needed to run this frequently
- Nmap
- Obtain it here https://nmap.org/
- or
brew install nmap
- I used version
7.50
of nmap.- Specifically this nmap script
vuln-ms17-010.nse
- Specifically this nmap script
- $DIR exists. (Create it where ever you want.)
- If nmaps path is different than
/usr/local/bin/nmap
you will have to change the path.
- I would recommend putting this on a cron.
- Writing a quick script to clean up the mess from the day and put that on a 24 hour cron.
- Clean up the code a bit.
- Have a file check that the path of nmap and $DIR exist.
- Have this log out to a file on runtime.