@@ -1906,7 +1906,7 @@ function sub_recursive_passive() {
1906
1906
fi
1907
1907
1908
1908
if [[ -s " .tmp/passive_recursive_tmp.txt" ]]; then
1909
- cat .tmp/passive_recursive_tmp.txt| anew -q .tmp/passive_recursive.txt
1909
+ cat .tmp/passive_recursive_tmp.txt | anew -q .tmp/passive_recursive.txt
1910
1910
fi
1911
1911
1912
1912
if [[ -s " .tmp/passive_recursive.txt" ]]; then
@@ -2742,7 +2742,7 @@ function screenshot() {
2742
2742
2743
2743
# Combine webs.txt and webs_uncommon_ports.txt into webs_all.txt if it doesn't exist
2744
2744
if [[ ! -s " webs/webs_all.txt" ]]; then
2745
- cat webs/webs.txt webs/webs_uncommon_ports.txt 2> /dev/null | anew -q webs/webs_all.txt
2745
+ cat webs/webs.txt webs/webs_uncommon_ports.txt 2> /dev/null | anew -q webs/webs_all.txt
2746
2746
fi
2747
2747
2748
2748
# Run nuclei or axiom-scan based on AXIOM flag
@@ -2990,9 +2990,9 @@ function portscan() {
2990
2990
2991
2991
if [[ -s " hosts/ips.txt" ]]; then
2992
2992
# Remove CDN IPs
2993
- comm -23 <( sort -u hosts/ips.txt) <( cut -d' [' -f1 hosts/cdn_providers.txt | sed ' s/[[:space:]]*$//' | sort -u) \
2994
- | grep -aEiv " ^(127|10|169\.254|172\.1[6-9]|172\.2[0-9]|172\.3[0-1]|192\.168)\." | grep -oE ' \b([0-9]{1,3}\.){3}[0-9]{1,3}\b' \
2995
- | sort -u | anew -q .tmp/ips_nocdn.txt
2993
+ comm -23 <( sort -u hosts/ips.txt) <( cut -d' [' -f1 hosts/cdn_providers.txt | sed ' s/[[:space:]]*$//' | sort -u) |
2994
+ grep -aEiv " ^(127|10|169\.254|172\.1[6-9]|172\.2[0-9]|172\.3[0-1]|192\.168)\." | grep -oE ' \b([0-9]{1,3}\.){3}[0-9]{1,3}\b' |
2995
+ sort -u | anew -q .tmp/ips_nocdn.txt
2996
2996
fi
2997
2997
2998
2998
# Display resolved IPs without CDN
@@ -3043,7 +3043,7 @@ function portscan() {
3043
3043
else
3044
3044
if [[ -s " .tmp/ips_nocdn.txt" ]]; then
3045
3045
axiom-scan .tmp/ips_nocdn.txt -m nmapx $PORTSCAN_ACTIVE_OPTIONS \
3046
- -oA hosts/portscan_active $AXIOM_EXTRA_ARGS 2>> " $LOGFILE " > /dev/null
3046
+ -oA hosts/portscan_active $AXIOM_EXTRA_ARGS 2>> " $LOGFILE " > /dev/null
3047
3047
fi
3048
3048
fi
3049
3049
fi
@@ -3327,9 +3327,9 @@ function fuzz() {
3327
3327
axiom-exec " wget -q -O - ${fuzzing_remote_list} > /home/op/lists/seclists/Discovery/Web-Content/big.txt" & > /dev/null
3328
3328
axiom-scan webs/webs_all.txt -m ffuf_base -H " ${HEADER} " $FFUF_FLAGS -s -maxtime $FFUF_MAXTIME -o $dir /.tmp/ffuf-content.json $AXIOM_EXTRA_ARGS 2>> " $LOGFILE " > /dev/null
3329
3329
pushd " ${tools} /ffufPostprocessing" > /dev/null || {
3330
- echo " Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO} "
3331
- }
3332
- [ -s " $dir /.tmp/ffuf-content.json" ] && ./ffufPostprocessing -result-file $dir /.tmp/ffuf-content.json -overwrite-result-file 2>> " $LOGFILE " > /dev/null
3330
+ echo " Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO} "
3331
+ }
3332
+ [ -s " $dir /.tmp/ffuf-content.json" ] && ./ffufPostprocessing -result-file $dir /.tmp/ffuf-content.json -overwrite-result-file 2>> " $LOGFILE " > /dev/null
3333
3333
popd > /dev/null || {
3334
3334
echo " Failed to popd in ${FUNCNAME[0]} @ line ${LINENO} "
3335
3335
}
@@ -4105,8 +4105,8 @@ function xss() {
4105
4105
# Run Dalfox with Katana output
4106
4106
if [[ -s " .tmp/xss_reflected.txt" ]]; then
4107
4107
printf " ${yellow} \n[$( date +' %Y-%m-%d %H:%M:%S' ) ] Running: Dalfox with Katana${reset} \n\n"
4108
- dalfox pipe --silence --no-color --no-spinner --only-poc r --ignore-return 302,404,403 --skip-bav $OPTIONS -d " $DEPTH " < " .tmp/xss_reflected.txt" 2>> " $LOGFILE " \
4109
- | anew -q " vulns/xss.txt"
4108
+ dalfox pipe --silence --no-color --no-spinner --only-poc r --ignore-return 302,404,403 --skip-bav $OPTIONS -d " $DEPTH " < " .tmp/xss_reflected.txt" 2>> " $LOGFILE " |
4109
+ anew -q " vulns/xss.txt"
4110
4110
fi
4111
4111
else
4112
4112
# Using Axiom
@@ -4253,7 +4253,6 @@ function ssrf_checks() {
4253
4253
# Handle COLLAB_SERVER configuration
4254
4254
if [[ -z $COLLAB_SERVER ]]; then
4255
4255
interactsh-client & > .tmp/ssrf_callback.txt &
4256
- INTERACTSH_PID=$!
4257
4256
sleep 2
4258
4257
4259
4258
# Extract FFUFHASH from interactsh_callback.txt
@@ -4502,7 +4501,7 @@ function sqli() {
4502
4501
if [[ $SQLMAP == true ]]; then
4503
4502
printf " ${yellow} \n[$( date +' %Y-%m-%d %H:%M:%S' ) ] Running: SQLMap for SQLi Checks${reset} \n\n"
4504
4503
python3 " ${tools} /sqlmap/sqlmap.py" -m " .tmp/tmp_sqli.txt" -b -o --smart \
4505
- --batch --disable-coloring --random-agent --output-dir=" vulns/sqlmap" 2>> " $LOGFILE " > /dev/null
4504
+ --batch --disable-coloring --random-agent --output-dir=" vulns/sqlmap" 2>> " $LOGFILE " > /dev/null
4506
4505
fi
4507
4506
4508
4507
# Check if GHAURI is enabled and run Ghauri
@@ -5061,45 +5060,44 @@ function remove_big_files() {
5061
5060
}
5062
5061
5063
5062
function notification() {
5064
- if [[ -n $1 ]] && [[ -n $2 ]]; then
5065
- if [[ $NOTIFICATION == true ]]; then
5066
- NOTIFY=" notify -silent"
5067
- else
5068
- NOTIFY=" "
5069
- fi
5070
- if [[ -z $3 ]]; then
5071
- current_date=$( date +' %Y-%m-%d %H:%M:%S' )
5072
- else
5073
- current_date=" $3 "
5074
- fi
5075
-
5076
- case $2 in
5077
- info)
5078
- text=" \n${bblue} [$current_date ] ${1} ${reset} "
5079
- ;;
5080
- warn)
5081
- text=" \n${yellow} [$current_date ] ${1} ${reset} "
5082
- ;;
5083
- error)
5084
- text=" \n${bred} [$current_date ] ${1} ${reset} "
5085
- ;;
5086
- good)
5087
- text=" \n${bgreen} [$current_date ] ${1} ${reset} "
5088
- ;;
5089
- esac
5090
-
5091
- # Print to terminal
5092
- printf " ${text} \n"
5093
-
5094
- # Send to notify if notifications are enabled
5095
- if [[ -n $NOTIFY ]]; then
5096
- # Remove color codes for the notification
5097
- clean_text=$( echo -e " ${text} - ${domain} " | sed ' s/\x1B\[[0-9;]*[JKmsu]//g' )
5098
- echo -e " ${clean_text} " | $NOTIFY > /dev/null 2>&1
5099
- fi
5100
- fi
5101
- }
5063
+ if [[ -n $1 ]] && [[ -n $2 ]]; then
5064
+ if [[ $NOTIFICATION == true ]]; then
5065
+ NOTIFY=" notify -silent"
5066
+ else
5067
+ NOTIFY=" "
5068
+ fi
5069
+ if [[ -z $3 ]]; then
5070
+ current_date=$( date +' %Y-%m-%d %H:%M:%S' )
5071
+ else
5072
+ current_date=" $3 "
5073
+ fi
5102
5074
5075
+ case $2 in
5076
+ info)
5077
+ text=" \n${bblue} [$current_date ] ${1} ${reset} "
5078
+ ;;
5079
+ warn)
5080
+ text=" \n${yellow} [$current_date ] ${1} ${reset} "
5081
+ ;;
5082
+ error)
5083
+ text=" \n${bred} [$current_date ] ${1} ${reset} "
5084
+ ;;
5085
+ good)
5086
+ text=" \n${bgreen} [$current_date ] ${1} ${reset} "
5087
+ ;;
5088
+ esac
5089
+
5090
+ # Print to terminal
5091
+ printf " ${text} \n"
5092
+
5093
+ # Send to notify if notifications are enabled
5094
+ if [[ -n $NOTIFY ]]; then
5095
+ # Remove color codes for the notification
5096
+ clean_text=$( echo -e " ${text} - ${domain} " | sed ' s/\x1B\[[0-9;]*[JKmsu]//g' )
5097
+ echo -e " ${clean_text} " | $NOTIFY > /dev/null 2>&1
5098
+ fi
5099
+ fi
5100
+ }
5103
5101
5104
5102
function transfer {
5105
5103
if [[ $# -eq 0 ]]; then
@@ -5322,7 +5320,7 @@ function start() {
5322
5320
global_start=$( date +%s)
5323
5321
5324
5322
printf " \n${bgreen} #######################################################################${reset} "
5325
- notification " Recon succesfully started on ${domain} " good $( date +' %Y-%m-%d %H:%M:%S' )
5323
+ notification " Recon succesfully started on ${domain} " " good" " $( date +' %Y-%m-%d %H:%M:%S' ) "
5326
5324
[ " $SOFT_NOTIFICATION " = true ] && echo " $( date +' %Y-%m-%d %H:%M:%S' ) Recon succesfully started on ${domain} " | notify -silent
5327
5325
printf " ${bgreen} #######################################################################${reset} \n"
5328
5326
if [[ $upgrade_before_running == true ]]; then
@@ -5414,7 +5412,7 @@ function end() {
5414
5412
global_end=$( date +%s)
5415
5413
getElapsedTime $global_start $global_end
5416
5414
printf " ${bgreen} #######################################################################${reset} \n"
5417
- notification " Finished Recon on: ${domain} under ${finaldir} in: ${runtime} " good $( date +' %Y-%m-%d %H:%M:%S' )
5415
+ notification " Finished Recon on: ${domain} under ${finaldir} in: ${runtime} " good " $( date +' %Y-%m-%d %H:%M:%S' ) "
5418
5416
[ " $SOFT_NOTIFICATION " = true ] && echo " [$( date +' %Y-%m-%d %H:%M:%S' ) ] Finished Recon on: ${domain} under ${finaldir} in: ${runtime} " | notify -silent
5419
5417
printf " ${bgreen} #######################################################################${reset} \n"
5420
5418
# Separator for more clear messges in telegram_Bot
0 commit comments