SubDomz
SubDomz copied to clipboard
syntax error: unexpected end of file
When running SubDomz.sh script, it returned SubDomz.sh: line 512: syntax error: unexpected end of file.
VirusTotal() function is not properly closed - it's missing a closing curly brace } at line number 273 or 274.
@0xPugal
Can fix by replacing the VirusTotal function with the following code:
VirusTotal() {
# Ensure domain and VIRUSTOTAL_API_KEY are set
if [ -z "$domain" ] || [ -z "$VIRUSTOTAL_API_KEY" ]; then
echo "Domain or API Key not set."
return 1
fi
if [ "$silent" == true ]; then
curl -s "https://www.virustotal.com/vtapi/v2/domain/report?apikey=$VIRUSTOTAL_API_KEY&domain=$domain" |
jq | egrep -v "http|Alexa domain info" |
grep "$domain" |
sed 's/[",]//g' |
sed 's/^[[:space:]]*//' |
anew subdomz-"$domain".txt
else
# Run the spinner in the background if PARALLEL is set to true
if [[ ${PARALLEL} == true ]]; then
spinner "${BOLD}VirusTotal${NC}" &
PID="$!"
fi
curl -s "https://www.virustotal.com/vtapi/v2/domain/report?apikey=$VIRUSTOTAL_API_KEY&domain=$domain" |
jq | egrep -v "http|Alexa domain info" |
grep "$domain" |
sed 's/[",]//g' |
sed 's/^[[:space:]]*//' |
sort -u > tmp-virustotal-"$domain"
if [[ ${PARALLEL} == true ]]; then
kill ${PID} 2>/dev/null
fi
# Print the result
echo -e "$BOLD[*] VirusTotal$NC: $(wc -l < tmp-virustotal-"$domain")"
fi
}
thanx i well be try.
@NicholasMarrone-1997 Thank you bro it worked !