__________ __ __ .__ .___
\______ \ ____ _____/ |_ ____ _______/ |_|__| ____ ____ _____ __| _/
| ___// __ \ / \ __\/ __ \ / ___/\ __\ |/ \ / ___\ / \ / __ |
| | \ ___/| | \ | \ ___/ \___ \ | | | | | \/ /_/ > | Y Y \/ /_/ |
|____| \___ >___| /__| \___ >____ > |__| |__|___| /\___ / /\ |__|_| /\____ |
\/ \/ \/ \/ \//_____/ \/ \/ \/ // Scan a subnet aggressively with 50 threads and save to CSV
for ip in 192.168.1.{1..254}; do
echo "$ip" >> targets.txt
done
go run bannerGrap.go -f targets.txt -proto http -threads 50 -timeout 2 -o aggressive_scan.csv
// Scan the same targets with different protocols and merge results
for proto in http https ftp ssh; do
go run bannerGrap.go -f targets.txt -proto $proto -threads 20 -o scan_$proto.json
done
// Combine all JSON results into one (requires jq)
jq -s 'add' scan_*.json > combined_results.json
// Discover live hosts and open ports, then scan with bannerGrap
nmap -p- --open -oG - 192.168.1.0/24 | awk '/Up$/{ip=$2} /Ports:/{split($0,a,"Ports: "); split(a[2],b,","); for(i in b) {split(b[i],c,"/"); print ip":"c[1]}}' > all_targets.txt
go run bannerGrap.go -f all_targets.txt -threads 100 -timeout 2 -o full_aggressive.json
// Run with brute force user/pass lists and HTML report
go run bannerGrap.go -f targets.txt -proto ssh \
--brute-userlist users.txt --brute-passlist passwords.txt \
--report-html report.html -threads 30
// Run with brute force user/pass lists and HTML report
go run bannerGrap.go -f targets.txt -proto ssh \
--brute-userlist users.txt --brute-passlist passwords.txt \
--report-html report.html -threads 30
// Run scans in parallel for a list of targets
cat targets.txt | parallel -j 20 "go run bannerGrap.go {} -proto http -timeout 2"
#!/bin/bash
// Aggressive multi-protocol, multi-output scan
TARGETS="targets.txt"
THREADS=50
TIMEOUT=2
for proto in http https ftp ssh smtp; do
go run bannerGrap.go -f "$TARGETS" -proto $proto -threads $THREADS -timeout $TIMEOUT -o "scan_${proto}.json"
done
// Merge all results
jq -s 'add' scan_*.json > all_protocols_combined.json
// Generate HTML report from combined results
go run bannerGrap.go -f "$TARGETS" -proto http --report-html all_protocols_report.html
Add to crontab for daily scan at 2am
0 2 * * * /usr/bin/go run /path/to/bannerGrap.go -f /path/to/targets.txt -proto https -threads 20 -o /path/to/daily_https_scan.json
// Scan and grep for critical vulnerabilities
go run bannerGrap.go -f targets.txt -proto http -threads 30 -o temp.json
grep -i "CVE-" temp.json | tee critical_vulns.txt
// Use masscan for fast discovery, then scan with bannerGrap
masscan 192.168.1.0/24 -p1-65535 --rate=10000 -oG masscan.gnmap
awk '/Ports:/{split($0,a,"Ports: "); split(a[2],b,","); for(i in b) {split(b[i],c,"/"); print $2":"c[1]}}' masscan.gnmap > masscan_targets.txt
go run bannerGrap.go -f masscan_targets.txt -threads 100 -timeout 2 -o masscan_bannergrap.json
- Download a username list and a password list from SecLists or any lists.
- Example : - usernames.txt (Ex: SecLists/Usernames/top-usernames-shortlist.txt or, SecLists/Usernames/Names/names.txt) - passwords.txt (Ex: SecLists/Passwords/Common-Credentials/ 10k-most-common.txt or,ecLists/Passwords/Common-Credentials/10k-most-common.txt or rockyou.txt for more coverage.)
Bash-
go run bannerGrap.go --brute-userlist usernames.txt --brute-passlist passwords.txt -proto ssh 192.168.1.100
go run bannerGrap.go -f targets.txt -proto http -threads 100 -timeout 2 -o scan_http.json
go run bannerGrap.go -f targets.txt -proto https -threads 100 -timeout 2 -o scan_https.json
go run bannerGrap.go -f targets.txt -proto ssh -threads 100 -timeout 2 -o scan_ssh.json
go run bannerGrap.go -f ssh_targets.txt -proto ssh --brute-userlist users.txt --brute-passlist passwords.txt -threads 50 -timeout 3 -o ssh_brute.json
go run bannerGrap.go -f targets.txt -proto http -max 16384 -threads 50 -v
for p in {1..65535}; do echo "192.168.1.100:$p"; done > allports.txt
go run bannerGrap.go -f allports.txt -threads 200 -timeout 1 -o allports.json
go run bannerGrap.go -f targets.txt -proto ftp --brute-userlist users.txt --brute-passlist passwords.txt --report-html ftp_report.html -threads 30
go run bannerGrap.go -f targets.txt -proto http --payload "GET /admin HTTP/1.1\r\nHost: %s\r\n\r\n" -threads 20
go run bannerGrap.go -f targets.txt -proto http --plugin-dir ./plugins -threads 20
go run bannerGrap.go -f targets.txt -proto http -o output.json --report-html output.html
go run bannerGrap.go -f targets.txt -proto http -timeout 1 -threads 100
go run bannerGrap.go -f targets.txt -proto http -port 8080 -threads 50
for proto in http https ftp ssh smtp; do
go run bannerGrap.go -f targets.txt -proto $proto -threads 30 -o scan_$proto.json
done
go run bannerGrap.go -f targets.txt -proto ssh --brute-userlist big_users.txt --brute-passlist big_passwords.txt -threads 100
go run bannerGrap.go -f targets.txt -proto http -threads 30 -o temp.json
grep -i "CVE-" temp.json
go run bannerGrap.go -f targets.txt -proto http -o siem_results.json
cat targets.txt | parallel -j 50 "go run bannerGrap.go {} -proto http -timeout 2"
for proto in http https ftp ssh smtp; do
go run bannerGrap.go -f targets.txt -proto $proto -threads 100 -timeout 2 -o scan_$proto.json
done
go run bannerGrap.go -f ssh_targets.txt -proto ssh --brute-userlist users.txt --brute-passlist passwords.txt -threads 50 -o ssh_brute.json
for ip in $(cat targets.txt); do
for p in {1..1000}; do
echo "$ip:$p"
done
done > allports.txt
go run bannerGrap.go -f allports.txt -threads 200 -timeout 1 -o allports.json
jq -s 'add' scan_*.json > combined_results.json
go run bannerGrap.go -f targets.txt -proto http --report-html aggressive_report.html -threads 50
cat targets.txt | parallel -j 30 "go run bannerGrap.go {} -proto http -timeout 2"
0 2 * * * /usr/bin/go run /path/to/bannerGrap.go -f /path/to/targets.txt -proto https -threads 20 -o /path/to/daily_https_scan.json
go run bannerGrap.go -f targets.txt -proto http -threads 30 -o temp.json
grep -i "CVE-" temp.json | mail -s "Critical Vulns Found" you@example.com
go run bannerGrap.go -f targets.txt -proto http --payload "GET /admin HTTP/1.1\r\nHost: %s\r\n\r\n" -threads 20
go run bannerGrap.go -f targets.txt -proto http --plugin-dir ./plugins -threads 20
go run bannerGrap.go -f targets.txt -proto http -o results.csv
go run bannerGrap.go -f targets.txt -proto http -timeout 1 -threads 100
go run bannerGrap.go -f targets.txt -proto http -port 8080 -threads 50
masscan 192.168.1.0/24 -p1-65535 --rate=10000 -oG masscan.gnmap
awk '/Ports:/{split($0,a,"Ports: "); split(a[2],b,","); for(i in b) {split(b[i],c,"/"); print $2":"c[1]}}' masscan.gnmap > masscan_targets.txt
go run bannerGrap.go -f masscan_targets.txt -threads 100 -timeout 2 -o masscan_bannergrap.json
go run bannerGrap.go -f targets.txt -proto ssh --brute-userlist users.txt --brute-passlist passwords.txt --report-html full_report.html --plugin-dir plugins/ -threads 100 -timeout 2 -o everything.json
- @ Use -threads and -timeout for aggressive speed.
- @ Use -o and --report-html for structured output.
- @ Combine with jq, awk, grep, and other Bash tools for post-processing.
- @ ******Mix, match, and tweak these to your heart’s content.
- @ Always have permission before scanning!