Skip to content
This repository was archived by the owner on Apr 3, 2018. It is now read-only.

Commit 122c972

Browse files
committed
Add logs in case we do not find any referer
1 parent 6a3cbc3 commit 122c972

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: funceble

+23
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ percentageLogOutput=${logOutput}percentage/
107107
# Output of execution Time log
108108
executionLog=${logOutput}execution.log
109109

110+
# Ouput of no referer log
111+
noRefererLogOutput=${logOutput}noReferer/
112+
110113
# Output of inactive domain
111114
outputInactiveHost=${inactiveHostsDir}${hostsDefault}
112115

@@ -626,6 +629,23 @@ errorHandle()
626629
fi
627630
}
628631

632+
############################## No Referers Log #################################
633+
# Used to generate the logs
634+
#
635+
# @CalledBy getReferer
636+
################################################################################
637+
noRefererLog(){
638+
if [[ ${outputLogs} == true ]]
639+
then
640+
# We save the output of the captured date into log directory
641+
printf "=%.0s" {1..100} >> ${noRefererLogOutput}.${domainExtension}
642+
printf "\nNo referer found for: %s domains\n" "${domainExtension}" >> ${noRefererLogOutput}.${domainExtension}
643+
printf "Tested domain: %s\n" "${initialDomain}" >> ${noRefererLogOutput}.${domainExtension}
644+
printf "=%.0s" {1..100} >> ${noRefererLogOutput}.${domainExtension}
645+
printf "\n" >> ${noRefererLogOutput}.${domainExtension}
646+
fi
647+
}
648+
629649
############################### Get Referer ####################################
630650
# Used to generate the report issue url
631651
#
@@ -703,6 +723,9 @@ getReferer(){
703723
# We empty the referer variable
704724
referer=''
705725

726+
# We log the issue
727+
noRefererLog
728+
706729
# We handle error & check if server is up
707730
errorHandle 'Error'
708731
fi

0 commit comments

Comments
 (0)