Skip to content

Brut-Security/SubWatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” SubWatch – Automated Subdomain Monitoring Script

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

πŸ“Œ Features

  • ⏱️ Runs automatically every 6 hours
  • 🧠 Tracks and stores unique subdomains per domain
  • πŸ“¨ Sends text + file notifications to Discord
  • βš™οΈ Uses subfinder, anew, jq, and notify
  • βœ… Clean, fast, and automation-ready

πŸ›  Requirements

You must install the following tools before running SubWatch:

  • subfinder – for subdomain enumeration
  • anew – for deduplication
  • jq – for parsing JSON
  • notify – for Discord notifications (text + file) βœ…

πŸ”§ Install Tools via Go and APT:

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/bin is in your $PATH so all tools work globally.


βš™οΈ Setup Instructions

You must export your Discord Webhook:

export DISCORD_WEBHOOK="https://discord.com/api/webhooks/XXXX/XXXX"
  1. Clone the Repo
git clone https://github.com/Brut-Security/subwatch.git
cd subwatch
  1. Create domains.txt

Add target domains (one per line):

example.com
testsite.org
  1. Configure notify with 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"
  1. Make the Script Executable
chmod +x subwatch.sh

πŸš€ Usage

Run the script:

./subwatch.sh

It will continuously run, scanning every 6 hours, and only notify when new subdomains are found.

Watch the video


πŸ“€ Output & Notifications

  • Subdomain lists are stored as <domain>-list.txt
  • New subdomains (if found) are:
    • Appended to the list
    • Saved to a temp .txt file
    • Sent to Discord using notify as both:
      • πŸ’¬ Message content
      • πŸ“Ž File attachment

🧠 Example Alert

🚨 New subdomains detected for `example.com` (3):
β€’ api.example.com
β€’ dev.example.com
β€’ staging.example.com

πŸ“Ž A .txt file is also sent with full subdomain list for easy access.

Watch the video


πŸ“£ Credits

Made with ❀️ by Brut Security
Join us for practical cybersecurity training, tools, and community.


πŸ“„ License

MIT License β€” see LICENSE for details.

About

πŸ” SubWatch – Automated Subdomain Monitoring Script

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages