Last active
October 24, 2022 20:29
-
-
Save xlbruce/9f7a0b5eef0ce3a458501e37686aac49 to your computer and use it in GitHub Desktop.
Discover real IP behind Cloudflare network
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 | |
function banner { | |
echo ' _____ _ ______ _ _____ _ _____ ' | |
echo '/ __ \ (_) | ___| | / __ \| | |_ _|' | |
echo '| / \/_ __ _ _ __ ___ ___| |_ | | __ _ _ __ ___ | / \/| | | | ' | |
echo "| | | '__| | '_ \` _ \ / _ \ _| | |/ _\` | '__/ _ \\ | | | | | | " | |
echo '| \__/\ | | | | | | | | __/ | | | (_| | | | __/ | \__/\| |_____| |_ ' | |
echo ' \____/_| |_|_| |_| |_|\___\_| |_|\__,_|_| \___| \____/\_____/\___/ ' | |
echo | |
echo "CrimeFlare CLI identifies real IP hosted behind Cloudflare." | |
echo "Github: https://www.github.com/xlbruce" | |
echo | |
} | |
function usage { | |
echo "Usage: bash $0 <domain>"; | |
echo "Example: bash $0 exampledomain.com"; | |
} | |
function log { | |
echo "[+] $@"; | |
} | |
banner; | |
host="$1" | |
if [ -z "$host" ]; then | |
usage; | |
exit 1; | |
fi | |
response=$(curl -s -XPOST http://www.crimeflare.org:82/cgi-bin/cfsearch.cgi -d "cfS=$host"); | |
real_ip=$(echo "$response" | grep -m1 -o '\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}\.\d\{1,3\}'); | |
if [ -z "$real_ip" ]; then | |
echo "IP address not found. Maybe the host $host is not at Cloudflare."; | |
exit 1; | |
fi | |
log "Information found for host $host"; | |
curl -sL "http://ipinfo.io/$real_ip/json"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment