Add Not - Anew but not. Remove lines from files, with a little bit of extra logic for your comfort. Perfect for bug bounty scope management and data filtering.
Tool inspired by anew from @tomnomnom.
- 🎯 Exact string matching: Remove specific lines from files
- 🌐 Wildcard domain support:
*.example.comremoves subdomains but preserves base domains - 📍 IP address filtering: Remove specific IP addresses
- 🌍 CIDR range support: Remove entire IP ranges with CIDR notation
- ⚡ High performance: Optimized for large files with pre-compiled patterns
# Remove lines from scope.txt that match patterns in oos.txt
cat oos.txt | anot scope.txt
# Alternative: using anot in the pipeline
cat out-of-scope.txt | anot tool_unfiltered_results.txt | anew aggregate_filtered_results.txt# Input file (scope.txt)
cloudways.com
test1.customer.cloudways.com
test2.customer.cloudways.com
api.cloudways.com
www.cloudways.com
css-tricks.com
# Patterns to remove (oos.txt)
*.customer.cloudways.com
css-tricks.com
# Result
cloudways.com
api.cloudways.com
www.cloudways.com# Remove specific IP and entire ranges
echo -e "10.0.0.1\n192.168.1.0/24\n*.internal.com" | anot targets.txtDownload the latest release for your platform from GitHub Releases.
git clone https://github.com/hasshido/anot
cd anot
go build -o anot .go install github.com/hasshido/anot@latestanot [options] <filename>Options:
-d: Dry-run mode - Show filtered output without modifying the file-q: Quiet mode - Update file silently (no stdout output)-t: Trim mode - Trim whitespace before comparison
Remove lines that exactly match the input:
echo "example.com" | anot targets.txtUse *.domain.com to remove subdomains but preserve the base domain:
# *.example.com removes:
# - sub.example.com ✅
# - deep.sub.example.com ✅
# - example.com ❌ (preserved)
echo "*.example.com" | anot scope.txtRemove specific IP addresses:
echo "192.168.1.100" | anot targets.txtRemove entire IP ranges using CIDR notation:
# Remove all IPs in the 10.0.0.0/8 range
echo "10.0.0.0/8" | anot targets.txt
# IPv6 is also supported
echo "2001:db8::/32" | anot targets.txtanot is optimized for large files:
- Pre-compiled CIDR matchers for faster IP range checking
- Single-pass IP parsing to minimize overhead
- Smart pattern routing to avoid unnecessary comparisons
- Efficient I/O buffering for large files
Benchmarks show processing of 20,000+ lines in under 100ms.
# Chain with other tools
subfinder -d example.com | anot -d scope.txt | httpxContributions are welcome! Please feel free to submit issues and pull requests.
This project is licensed under the MIT License.