Last active
August 4, 2024 05:35
-
-
Save vzool/681fa084ba53447a62b183470c393b3b to your computer and use it in GitHub Desktop.
check for domain hosted at A2Hosting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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