Skip to content

reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities

fix nuclei

six2dezfc11c0362607
diff --git a/reconftw.sh b/reconftw.sh
index 83162e2..45cc636 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -3273,17 +3273,9 @@ function nuclei_check() {
# Combine url_extract_nodupes.txt, subdomains.txt, and webs_all.txt into webs_subs.txt if it doesn't exist
if [[ ! -s ".tmp/webs_subs.txt" ]]; then
- cat webs/url_extract_nodupes.txt subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" | anew -q .tmp/webs_subs.txt
+ cat subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" > .tmp/webs_subs.txt
fi
- # If fuzzing_full.txt exists, process it and create webs_fuzz.txt
- if [[ -s "$dir/fuzzing/fuzzing_full.txt" ]]; then
- grep "^200" "$dir/fuzzing/fuzzing_full.txt" | cut -d " " -f3 | anew -q .tmp/webs_fuzz.txt
- fi
-
- # Combine webs_subs.txt and webs_fuzz.txt into webs_nuclei.txt and duplicate it
- cat .tmp/webs_subs.txt .tmp/webs_fuzz.txt 2>>"$LOGFILE" | anew -q .tmp/webs_nuclei.txt
- cat .tmp/webs_nuclei.txt | anew -q webs/webs_nuclei.txt
# Check if AXIOM is enabled
if [[ $AXIOM != true ]]; then
# Split severity levels into an array
@@ -3292,7 +3284,7 @@ function nuclei_check() {
for crit in "${severity_array[@]}"; do
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Severity: $crit ${reset}\n\n"
# Run nuclei for each severity level
- nuclei -l .tmp/webs_nuclei.txt -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH} -j -o "nuclei_output/${crit}_json.txt" 2>>"$LOGFILE" >/dev/null
+ nuclei -l .tmp/webs_subs.txt -severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH} -j -o "nuclei_output/${crit}_json.txt" 2>>"$LOGFILE" >/dev/null
# Parse the JSON output and save the results to a text file
if [[ -s "nuclei_output/${crit}_json.txt" ]]; then
jq -r '["[" + .["template-id"] + (if .["matcher-name"] != null then ":" + .["matcher-name"] else "" end) + "] [" + .["type"] + "] [" + .info.severity + "] " + (.["matched-at"] // .host) + (if .["extracted-results"] != null then " " + (.["extracted-results"] | @json) else "" end)] | .[]' nuclei_output/${crit}_json.txt >nuclei_output/${crit}.txt
@@ -3312,7 +3304,7 @@ function nuclei_check() {
for crit in "${severity_array[@]}"; do
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Axiom Nuclei Severity: $crit. Check results in nuclei_output folder.${reset}\n\n"
# Run axiom-scan with nuclei module for each severity level
- axiom-scan .tmp/webs_nuclei.txt -m nuclei \
+ axiom-scan .tmp/webs_subs.txt -m nuclei \
--nuclei-templates "$NUCLEI_TEMPLATES_PATH" \
-severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" \
-silent -retries 2 "$NUCLEI_EXTRA_ARGS" -j -o "nuclei_output/${crit}_json.txt" "$AXIOM_EXTRA_ARGS" 2>>"$LOGFILE" >/dev/null
@@ -5018,7 +5010,7 @@ function fuzzparams() {
fi
# Execute Nuclei with the fuzzing templates
- nuclei -l webs/webs_nuclei.txt -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH}/dast -dast -j -o ".tmp/fuzzparams_json.txt" <"webs/url_extract_nodupes.txt" 2>>"$LOGFILE" >/dev/null
+ nuclei -l webs/url_extract_nodupes.txt -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_TEMPLATES_PATH}/dast -dast -j -o ".tmp/fuzzparams_json.txt" <"webs/url_extract_nodupes.txt" 2>>"$LOGFILE" >/dev/null
else
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Axiom with Nuclei${reset}\n\n"
@@ -5028,7 +5020,7 @@ function fuzzparams() {
axiom-exec "git clone https://github.com/projectdiscovery/fuzzing-templates /home/op/fuzzing-templates" &>/dev/null
fi
- axiom-scan .tmp/webs_nuclei.txt -m nuclei \
+ axiom-scan webs/url_extract_nodupes.txt -m nuclei \
--remote-folder "/home/op/fuzzing-templates" \
-nh -rl "$NUCLEI_RATELIMIT" \
-silent -retries 2 "$NUCLEI_EXTRA_ARGS" -dast -j -o ".tmp/fuzzparams_json.txt" $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null