CLI tool for Mac OS to automate network scans and notify, using ntfy.sh, of any new or dropped connections on your network.
The script will scan for your particular network IP using ipconfig and then scan the subnet for devices/hosts using nmap. Following, it will look for differences in connected hosts logs and send the information to your ntfy server.
Install Nmap -> https://nmap.org/download#macosx
or using homebrew
brew install nmap
- Install script to the default mac os PATH location
/usr/local/bin
curl -L https://raw.githubusercontent.com/patricksthannon/InvaderInformant/refs/heads/main/InvaderInformant.sh -o /usr/local/bin/InvaderInformant.sh && chmod +x /usr/local/bin/InvaderInformant.sh
- Edit script to add your ntfy server ip and topic name
topic=your_ntfy_topic_here
notifyserver=your_ntfy_server_ip_here
Edit using Vim
vim /usr/local/bin/InvaderInformant.sh
Or Edit using VSCode
code /usr/local/bin/InvaderInformant.sh
- Test script
InvaderInformant.sh
- Add on a cron schedule
crontab -e
add a cronjob
(every 5 minutes as the example or use a Crontab Generator)
Press i
*/5 * * * * /usr/local/bin/InvaderInformant.sh
Save and quit your crontab script schedule
Press escape
:wq
This is an modified version of notify_me_the_intruders by nothingbutlucas
If you like this project, consider buying me a coffee to keep me motivated! I appreciate it!