# notify
This is a cool little script from [projectnotify](https://github.com/projectdiscovery/notify) that lets you send yourself email/Slack/Discord/Teams/etc. notifications from output of tools, system events, and more!

One of my favorite things to do is tail a log file from something like [ntlmrelayx](/pentesting/Internal/ntlmrelayx) so that when I get a "hit" for something important - like the dumping of LAPS passwords - I can notify myself through one or more comms channels.  Check out this example:

## Example: use notify to fire the notify program when specific text gets written to a log file
This script watches `ntlmrelay.log` and anytime the word `LAPS` is written to it, it sends me the contents of `alert.txt`:

```
#!/bin/bash

tail -Fn0 /home/kali/ntlmrelay.log | \
while read line; do
  echo "$line" | grep -i "LAPS" &> /dev/null
  if [ $? = 0 ]; then
    /home/kali/notify -p discord -i /home/kali/alert.txt
  fi
done
```
