Skip to content

Commit 7b3e937

Browse files
authored
Merge pull request #956 from six2dez/dev
Dev
2 parents 2ada425 + 79af783 commit 7b3e937

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

reconftw.sh

+8-17
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,7 @@ function subtakeover() {
21982198
cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt
21992199
fi
22002200

2201-
cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
2201+
#cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
22022202

22032203
if [[ $AXIOM != true ]]; then
22042204
if ! nuclei -update 2>>"$LOGFILE" >/dev/null; then
@@ -3241,7 +3241,7 @@ function nuclei_check() {
32413241
# Check if the function should run
32423242
if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $NUCLEICHECK == true ]]; then
32433243
start_func "${FUNCNAME[0]}" "Templates-based Web Scanner"
3244-
cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
3244+
#cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
32453245
# Update nuclei templates
32463246
nuclei -update 2>>"$LOGFILE" >/dev/null
32473247

@@ -3258,17 +3258,9 @@ function nuclei_check() {
32583258

32593259
# Combine url_extract_nodupes.txt, subdomains.txt, and webs_all.txt into webs_subs.txt if it doesn't exist
32603260
if [[ ! -s ".tmp/webs_subs.txt" ]]; then
3261-
cat webs/url_extract_nodupes.txt subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" | anew -q .tmp/webs_subs.txt
3261+
cat subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" > .tmp/webs_subs.txt
32623262
fi
32633263

3264-
# If fuzzing_full.txt exists, process it and create webs_fuzz.txt
3265-
if [[ -s "$dir/fuzzing/fuzzing_full.txt" ]]; then
3266-
grep "^200" "$dir/fuzzing/fuzzing_full.txt" | cut -d " " -f3 | anew -q .tmp/webs_fuzz.txt
3267-
fi
3268-
3269-
# Combine webs_subs.txt and webs_fuzz.txt into webs_nuclei.txt and duplicate it
3270-
cat .tmp/webs_subs.txt .tmp/webs_fuzz.txt 2>>"$LOGFILE" | anew -q .tmp/webs_nuclei.txt
3271-
cat .tmp/webs_nuclei.txt | anew -q webs/webs_nuclei.txt
32723264
# Check if AXIOM is enabled
32733265
if [[ $AXIOM != true ]]; then
32743266
# Split severity levels into an array
@@ -3277,7 +3269,7 @@ function nuclei_check() {
32773269
for crit in "${severity_array[@]}"; do
32783270
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Severity: $crit ${reset}\n\n"
32793271
# Run nuclei for each severity level
3280-
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
3272+
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
32813273
# Parse the JSON output and save the results to a text file
32823274
if [[ -s "nuclei_output/${crit}_json.txt" ]]; then
32833275
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
@@ -3297,7 +3289,7 @@ function nuclei_check() {
32973289
for crit in "${severity_array[@]}"; do
32983290
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Axiom Nuclei Severity: $crit. Check results in nuclei_output folder.${reset}\n\n"
32993291
# Run axiom-scan with nuclei module for each severity level
3300-
axiom-scan .tmp/webs_nuclei.txt -m nuclei \
3292+
axiom-scan .tmp/webs_subs.txt -m nuclei \
33013293
--nuclei-templates "$NUCLEI_TEMPLATES_PATH" \
33023294
-severity "$crit" -nh -rl "$NUCLEI_RATELIMIT" \
33033295
-silent -retries 2 "$NUCLEI_EXTRA_ARGS" -j -o "nuclei_output/${crit}_json.txt" "$AXIOM_EXTRA_ARGS" 2>>"$LOGFILE" >/dev/null
@@ -3392,7 +3384,6 @@ function fuzz() {
33923384
end_func "No $domain/web/webs.txts file found, fuzzing skipped " ${FUNCNAME[0]}
33933385
fi
33943386

3395-
end_func "Results are saved in $domain/fuzzing folder" "${FUNCNAME[0]}"
33963387
else
33973388
if [[ $FUZZ == false ]]; then
33983389
printf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"
@@ -4983,7 +4974,7 @@ function fuzzparams() {
49834974
URL_COUNT=$(wc -l <"webs/url_extract_nodupes.txt")
49844975
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT2 ]]; then
49854976

4986-
cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
4977+
#cent update -p ${NUCLEI_TEMPLATES_PATH} &>/dev/null
49874978

49884979
if [[ $AXIOM != true ]]; then
49894980
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Nuclei Setup and Execution${reset}\n\n"
@@ -5003,7 +4994,7 @@ function fuzzparams() {
50034994
fi
50044995

50054996
# Execute Nuclei with the fuzzing templates
5006-
nuclei -l webs/url_extract_nodupes.txt -nh -rl "$NUCLEI_RATELIMIT" -silent -retries 2 ${NUCLEI_EXTRA_ARGS} -t ${NUCLEI_FUZZING_TEMPLATES_PATH} -dast -j -o ".tmp/fuzzparams_json.txt" <"webs/url_extract_nodupes.txt" 2>>"$LOGFILE" >/dev/null
4997+
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
50074998

50084999
else
50095000
printf "${yellow}\n[$(date +'%Y-%m-%d %H:%M:%S')] Running: Axiom with Nuclei${reset}\n\n"
@@ -5013,7 +5004,7 @@ function fuzzparams() {
50135004
axiom-exec "git clone https://github.com/projectdiscovery/fuzzing-templates /home/op/fuzzing-templates" &>/dev/null
50145005
fi
50155006

5016-
axiom-scan .tmp/webs_nuclei.txt -m nuclei \
5007+
axiom-scan webs/url_extract_nodupes.txt -m nuclei \
50175008
--remote-folder "/home/op/fuzzing-templates" \
50185009
-nh -rl "$NUCLEI_RATELIMIT" \
50195010
-silent -retries 2 "$NUCLEI_EXTRA_ARGS" -dast -j -o ".tmp/fuzzparams_json.txt" $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null

0 commit comments

Comments
 (0)