Skip to content

Commit

Permalink
Merge pull request #725 from N1CK5V/main
Browse files Browse the repository at this point in the history
Fix timeout -k implementation error
  • Loading branch information
six2dez authored Jun 13, 2023
2 parents 1a4d3eb + f716352 commit d6fffc3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions reconftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function domain_info(){
start_func ${FUNCNAME[0]} "Searching domain info (whois, registrant name/email domains)"
whois -H $domain > osint/domain_info_general.txt
if [ "$DEEP" = true ] || [ "$REVERSE_WHOIS" = true ]; then
timeout -k "$AMASS_INTEL_TIMEOUT" amass intel -d "${domain}" -whois -timeout "$AMASS_INTEL_TIMEOUT" -o osint/domain_info_reverse_whois.txt 2>&1 | tee -a "$LOGFILE" &>/dev/null
timeout -k 1m ${AMASS_INTEL_TIMEOUT}m amass intel -d ${domain} -whois -timeout $AMASS_INTEL_TIMEOUT -o osint/domain_info_reverse_whois.txt 2>>"$LOGFILE" &>/dev/null
fi
end_func "Results are saved in $domain/osint/domain_info_[general/name/email/ip].txt" ${FUNCNAME[0]}
else
Expand Down Expand Up @@ -354,7 +354,7 @@ function sub_passive(){
if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$SUBPASSIVE" = true ]; then
start_subfunc ${FUNCNAME[0]} "Running : Passive Subdomain Enumeration"
if [ ! "$AXIOM" = true ]; then
[[ $RUNAMASS == true ]] && timeout -k "$AMASS_ENUM_TIMEOUT" amass enum -passive -d "$domain" -config "$AMASS_CONFIG" -timeout "$AMASS_ENUM_TIMEOUT" -json .tmp/amass_json.json 2>>"$LOGFILE" >/dev/null
[[ $RUNAMASS == true ]] && timeout -k 1m ${AMASS_ENUM_TIMEOUT} amass enum -passive -d $domain -config $AMASS_CONFIG -timeout $AMASS_ENUM_TIMEOUT -json .tmp/amass_json.json 2>>"$LOGFILE" &>/dev/null
[ -s ".tmp/amass_json.json" ] && cat .tmp/amass_json.json | jq -r '.name' | anew -q .tmp/amass_psub.txt
[[ $RUNSUBFINDER == true ]] && subfinder -all -d "$domain" -silent -o .tmp/subfinder_psub.txt 2>>"$LOGFILE" >/dev/null
else
Expand Down Expand Up @@ -726,8 +726,8 @@ function sub_recursive_passive(){
[ -s "subdomains/subdomains.txt" ] && dsieve -if subdomains/subdomains.txt -f 3 -top $DEEP_RECURSIVE_PASSIVE > .tmp/subdomains_recurs_top.txt
if [ ! "$AXIOM" = true ]; then
resolvers_update_quick_local
[ -s ".tmp/subdomains_recurs_top.txt" ] && timeout -k $AMASS_ENUM_TIMEOUT amass enum -passive -df .tmp/subdomains_recurs_top.txt -nf subdomains/subdomains.txt -config $AMASS_CONFIG -timeout $AMASS_ENUM_TIMEOUT 2>>"$LOGFILE" | anew -q .tmp/passive_recursive.txt
[ -s ".tmp/passive_recursive.txt" ] && puredns resolve .tmp/passive_recursive.txt -w .tmp/passive_recurs_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT --wildcard-tests $PUREDNS_WILDCARDTEST_LIMIT --wildcard-batch $PUREDNS_WILDCARDBATCH_LIMIT 2>>"$LOGFILE" >/dev/null
[ -s ".tmp/subdomains_recurs_top.txt" ] && timeout -k 1m ${AMASS_ENUM_TIMEOUT}m amass enum -passive -df .tmp/subdomains_recurs_top.txt -nf subdomains/subdomains.txt -config $AMASS_CONFIG -timeout $AMASS_ENUM_TIMEOUT 2>>"$LOGFILE" | anew -q .tmp/passive_recursive.txt
[ -s ".tmp/passive_recursive.txt" ] && puredns resolve .tmp/passive_recursive.txt -w .tmp/passive_recurs_tmp.txt -r $resolvers --resolvers-trusted $resolvers_trusted -l $PUREDNS_PUBLIC_LIMIT --rate-limit-trusted $PUREDNS_TRUSTED_LIMIT --wildcard-tests $PUREDNS_WILDCARDTEST_LIMIT --wildcard-batch $PUREDNS_WILDCARDBATCH_LIMIT 2>>"$LOGFILE" &>/dev/null
else
resolvers_update_quick_axiom
[ -s ".tmp/subdomains_recurs_top.txt" ] && axiom-scan .tmp/subdomains_recurs_top.txt -m amass -passive -o .tmp/amass_prec.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null
Expand Down Expand Up @@ -1224,7 +1224,7 @@ function cms_scanner(){
[ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt
if [ -s ".tmp/webs_all.txt" ]; then
tr '\n' ',' < .tmp/webs_all.txt > .tmp/cms.txt
timeout -k $CMSSCAN_TIMEOUT python3 $tools/CMSeeK/cmseek.py -l .tmp/cms.txt --batch -r 2>>"$LOGFILE" >/dev/null
timeout -k 1m ${CMSSCAN_TIMEOUT}s python3 $tools/CMSeeK/cmseek.py -l .tmp/cms.txt --batch -r 2>>"$LOGFILE" &>/dev/null
exit_status=$?
if [[ $exit_status -eq 125 ]]; then
echo "TIMEOUT cmseek.py - investigate manually for $dir" >> "$LOGFILE"
Expand Down

0 comments on commit d6fffc3

Please sign in to comment.