Skip to content

Instantly share code, notes, and snippets.

@vzool
Last active August 4, 2024 05:35
Show Gist options
  • Save vzool/681fa084ba53447a62b183470c393b3b to your computer and use it in GitHub Desktop.
Save vzool/681fa084ba53447a62b183470c393b3b to your computer and use it in GitHub Desktop.
check for domain hosted at A2Hosting
#!/bin/bash
# check for domain hosted at A2Hosting - made by Abdelaziz Elrashed (vzool)
if [ -z $1 ]; then
echo "Usage $0 <domain>"
exit 1
fi
ip=$(curl https://ipfinder.us)
echo "================================================================"
echo "Your IP (according to https://ipfinder.us): $ip"
commands=(
"traceroute -p 2083 $1"
"traceroute -p 2096 $1"
"traceroute -p 993 mail.$1"
"traceroute -p 465 mail.$1"
"traceroute -p 80 webmail.$1"
"traceroute -p 443 webmail.$1"
"traceroute -p 80 cpanel.$1"
"traceroute -p 443 cpanel.$1"
"traceroute -p 80 $1"
"traceroute -p 443 $1"
)
for command in "${commands[@]}"; do
echo "----------------------------------------------------------------"
echo "Running: [$command]..." # Display the command being executed
echo "----------------------------------------------------------------"
$command
echo "----------------------------------------------------------------"
if [ $? -eq 0 ]; then
echo "Done: [$command]"
else
echo "Failure: [$command] encountered an error (exit status: $?)."
fi
echo "----------------------------------------------------------------"
echo "" # Add a blank line for readability
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment