SubWatch is a lightweight Bash script that automates subdomain monitoring using subfinder, anew, and notify. It scans your target domains every 6 hours and sends newly discovered subdomains as text and file alerts to your Discord channel β perfect for bug bounty, red team, and recon workflows.
_____ __ _ __ __ __ / ___/__ __/ /_| | / /___ _/ /______/ /_ \__ \/ / / / __ \ | /| / / __ `/ __/ ___/ __ \ ___/ / /_/ / /_/ / |/ |/ / /_/ / /_/ /__/ / / / /____/\__,_/_.___/|__/|__/\__,_/\__/\___/_/ /_/ Made with β€οΈ by Brut Security
- β±οΈ Runs automatically every 6 hours
- π§ Tracks and stores unique subdomains per domain
- π¨ Sends text + file notifications to Discord
- βοΈ Uses
subfinder,anew,jq, andnotify - β Clean, fast, and automation-ready
You must install the following tools before running SubWatch:
subfinderβ for subdomain enumerationanewβ for deduplicationjqβ for parsing JSONnotifyβ for Discord notifications (text + file) β
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest go install -v github.com/tomnomnom/anew@latest go install -v github.com/projectdiscovery/notify/cmd/notify@latest sudo apt install jq
Ensure your
$GOPATH/binis in your$PATHso all tools work globally.
You must export your Discord Webhook:
export DISCORD_WEBHOOK="https://discord.com/api/webhooks/XXXX/XXXX"
- Clone the Repo
git clone https://github.com/Brut-Security/subwatch.git
cd subwatch- Create
domains.txt
Add target domains (one per line):
example.com
testsite.org
- Configure
notifywith Discord Webhook
nano /.config/notify/provider-config.yaml
Add your Discord webhook and name the provider subdomains (this ID is used by the script).
Example config snippet:
discord: - id: "subdomains" webhook_url: "https://discord.com/api/webhooks/XXXX/XXXX"
- Make the Script Executable
chmod +x subwatch.sh
Run the script:
./subwatch.sh
It will continuously run, scanning every 6 hours, and only notify when new subdomains are found.
- Subdomain lists are stored as
<domain>-list.txt - New subdomains (if found) are:
- Appended to the list
- Saved to a temp
.txtfile - Sent to Discord using
notifyas both:- π¬ Message content
- π File attachment
π¨ New subdomains detected for `example.com` (3):
β’ api.example.com
β’ dev.example.com
β’ staging.example.com
π A
.txtfile is also sent with full subdomain list for easy access.
Made with β€οΈ by Brut Security
Join us for practical cybersecurity training, tools, and community.
- π brutsec.com
- π¦ Twitter
- πΌ LinkedIn
- π± Telegram
- π§ info@brutsec.com
MIT License β see LICENSE for details.