Last active
February 17, 2021 13:53
-
-
Save a9v8i/ca669a46834b4df04874cda7152ca503 to your computer and use it in GitHub Desktop.
Reverse IP Domain Checker
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 | |
# v10 | |
# ┌──(unk9vvn㉿avi)-[~] | |
# └─$ sudo chmod +x ripdc.sh;sudo ./ripdc.sh -t target.com | |
VERSION="ripdc.sh v0.3" | |
FALSE="0" | |
TRUE="1" | |
SUCCESS="1337" | |
FAILURE="31337" | |
VERBOSE="/dev/null" | |
reverse_map() | |
{ | |
url="https://domains.yougetsignal.com/" | |
file="domains.php" | |
data="remoteAddress=${target}&key=" | |
referer="https://www.yougetsignal.com/tools/web-sites-on-web-server/" | |
echo "[+] reverse mapping ${target}" | |
domains="`curl -e "${referer}" -d "${data}" "${url}${file}" 2> ${VERBOSE} | | |
tr -s ':' '\n' | grep '\[\["' | tr -d '{}[]",' | tr -s ' ' '\n'`" | |
if [ ! -z "${domains}" ] | |
then | |
echo "[+] listing found domains" | |
for domain in ${domains} | |
do | |
echo " > ${domain}" | |
done | |
else | |
warn "no domains were found" | |
fi | |
return ${SUCCESS} | |
} | |
warn() | |
{ | |
echo "[!] WARNING: ${*}" | |
return ${SUCCESS} | |
} | |
err() | |
{ | |
echo "[-] ERROR: ${*}" | |
exit ${FAILURE} | |
return ${SUCCESS} | |
} | |
usage() | |
{ | |
echo "usage:" | |
echo "" | |
echo " ripdc.sh -t <arg> [options] | <misc>" | |
echo "" | |
echo "options:" | |
echo "" | |
echo " -t <target> - domain name or ip address" | |
echo " -v - verbose mode (default: off)" | |
echo "" | |
echo "misc:" | |
echo "" | |
echo " -V - print version of ripdc and exit" | |
echo " -H - print this help and exit" | |
exit ${SUCCESS} | |
return ${SUCCESS} | |
} | |
check_argc() | |
{ | |
if [ ${#} -lt 1 ] | |
then | |
err "-H for help and usage" | |
fi | |
return ${SUCCESS} | |
} | |
check_args() | |
{ | |
echo "[+] checking arguments" > ${VERBOSE} 2>&1 | |
if [ -z "${target}" ] | |
then | |
err "WTF?! mount /dev/brain" | |
fi | |
return ${SUCCESS} | |
} | |
get_opts() | |
{ | |
while getopts t:vVH flags | |
do | |
case ${flags} in | |
t) | |
target="${OPTARG}" | |
;; | |
v) | |
VERBOSE="/dev/stdout" | |
;; | |
V) | |
echo "${VERSION}" | |
exit ${SUCCESS} | |
;; | |
H) | |
usage | |
;; | |
*) | |
err "WTF?! mount /dev/brain" | |
;; | |
esac | |
done | |
return ${SUCCESS} | |
} | |
main() | |
{ | |
check_argc ${*} | |
get_opts ${*} | |
check_args ${*} | |
reverse_map | |
echo "[+] game over" | |
return ${SUCCESS} | |
} | |
main ${*} | |
@a9v8i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment