Created
August 20, 2021 07:06
-
-
Save PaulSec/5332b09691124dd9f5d3a506e04035ab to your computer and use it in GitHub Desktop.
Nuclei bash script to automate discovery with httpx and scanning and store results in /tmp/nuclei/<date>/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
foo=`date +'%Y_%m_%d'` | |
database="/path/to/my/sql_app.db" | |
nucleitemplates="/path/to/my/nuclei-templates/" | |
cd $nucleitemplates | |
git pull | |
output_folder="/tmp/nuclei/$foo" | |
mkdir -p $output_folder | |
echo -e ".mode csv\n.out /tmp/nuclei/$foo/domains.csv\nselect domain from domain;" | sqlite3 $database | |
cat $output_folder/domains.csv | httpx -o $output_folder/urls.txt | |
cat /tmp/nuclei/$foo/urls.txt | parallel --colsep '/' --jobs 10 nuclei -target {1}//{3} -t $nucleitemplates -severity critical,high,medium -o $output_folder/{3}.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment