Initial commit - NUC server configuration and docs
- CLAUDE.md: Server instructions and service reference - docs/: Persistent documentation (architecture, guides) - .artifacts/: Session-generated notes - playwriter-browser/: Remote browser container config Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
117
docs/scripts/domain-check.sh
Executable file
117
docs/scripts/domain-check.sh
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/bin/bash
|
||||
# Domain Pre-Purchase Check Script
|
||||
# Usage: ./domain-check.sh example.com
|
||||
|
||||
DOMAIN="$1"
|
||||
|
||||
if [ -z "$DOMAIN" ]; then
|
||||
echo "Usage: $0 <domain>"
|
||||
echo "Example: $0 whyrating.com"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "╔════════════════════════════════════════════════════════════╗"
|
||||
echo "║ Domain Pre-Purchase Check: $DOMAIN"
|
||||
echo "╚════════════════════════════════════════════════════════════╝"
|
||||
|
||||
# 1. WHOIS Check
|
||||
echo -e "\n━━━ [1/7] WHOIS Registration ━━━"
|
||||
WHOIS_RESULT=$(whois "$DOMAIN" 2>/dev/null)
|
||||
if echo "$WHOIS_RESULT" | grep -qi "No match"; then
|
||||
echo "✅ Domain is AVAILABLE (not registered)"
|
||||
else
|
||||
echo "⚠️ Domain is REGISTERED"
|
||||
echo "$WHOIS_RESULT" | grep -iE "registrar|creation|updated|status" | head -5
|
||||
fi
|
||||
|
||||
# 2. DNS Resolution
|
||||
echo -e "\n━━━ [2/7] DNS Resolution ━━━"
|
||||
IPS=$(dig +short "$DOMAIN" A 2>/dev/null)
|
||||
if [ -n "$IPS" ]; then
|
||||
echo "IPs: $IPS"
|
||||
else
|
||||
echo "No A records (domain not configured or available)"
|
||||
fi
|
||||
|
||||
# 3. HTTP Check
|
||||
echo -e "\n━━━ [3/7] HTTP Accessibility ━━━"
|
||||
HTTP_STATUS=$(curl -sI --max-time 5 "https://$DOMAIN" 2>/dev/null | head -1)
|
||||
if [ -n "$HTTP_STATUS" ]; then
|
||||
echo "$HTTP_STATUS"
|
||||
else
|
||||
echo "No HTTP response (site not live)"
|
||||
fi
|
||||
|
||||
# 4. Spanish ISP Block Check
|
||||
echo -e "\n━━━ [4/7] Spanish ISP Block Check (LaLiga) ━━━"
|
||||
if [ -n "$IPS" ]; then
|
||||
for IP in $IPS; do
|
||||
echo "Checking IP: $IP"
|
||||
BLOCK_DATA=$(curl -s "https://hayahora.futbol/estado/data.json" 2>/dev/null)
|
||||
if [ -n "$BLOCK_DATA" ]; then
|
||||
BLOCKED=$(echo "$BLOCK_DATA" | grep -c "\"$IP\"")
|
||||
if [ "$BLOCKED" -gt 0 ]; then
|
||||
echo " 🚫 WARNING: IP found in Spanish block list!"
|
||||
echo "$BLOCK_DATA" | python3 -c "
|
||||
import json, sys
|
||||
data = json.load(sys.stdin)
|
||||
ip = '$IP'
|
||||
for entry in data.get('data', []):
|
||||
if entry.get('ip') == ip:
|
||||
last = entry['stateChanges'][-1]
|
||||
status = '🚫 BLOCKED' if last['state'] else '✅ OK'
|
||||
print(f\" {entry['isp']}: {status}\")
|
||||
" 2>/dev/null
|
||||
else
|
||||
echo " ✅ IP not in Spanish block list"
|
||||
fi
|
||||
else
|
||||
echo " ⚠️ Could not reach hayahora.futbol API"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "No IPs to check (domain not configured)"
|
||||
fi
|
||||
|
||||
# 5. Global Accessibility
|
||||
echo -e "\n━━━ [5/7] Global Accessibility ━━━"
|
||||
if [ -n "$IPS" ]; then
|
||||
RESULT=$(curl -s "https://check-host.net/check-http?host=$DOMAIN&max_nodes=5" -H "Accept: application/json" 2>/dev/null)
|
||||
REQUEST_ID=$(echo "$RESULT" | grep -o '"request_id":"[^"]*' | cut -d'"' -f4)
|
||||
if [ -n "$REQUEST_ID" ]; then
|
||||
echo "Check initiated: https://check-host.net/check-report/$REQUEST_ID"
|
||||
sleep 3
|
||||
LOCATIONS=$(curl -s "https://check-host.net/check-result/$REQUEST_ID" -H "Accept: application/json" 2>/dev/null | \
|
||||
python3 -c "
|
||||
import json, sys
|
||||
try:
|
||||
data = json.load(sys.stdin)
|
||||
for loc, result in data.items():
|
||||
if result and result[0]:
|
||||
status = '✅' if result[0][0] == 1 else '❌'
|
||||
code = result[0][3] if len(result[0]) > 3 else 'N/A'
|
||||
print(f' {status} {loc}: HTTP {code}')
|
||||
except: pass
|
||||
" 2>/dev/null)
|
||||
if [ -n "$LOCATIONS" ]; then
|
||||
echo "$LOCATIONS"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Skipped (no IPs configured)"
|
||||
fi
|
||||
|
||||
# 6. Security Links
|
||||
echo -e "\n━━━ [6/7] Security Check Links ━━━"
|
||||
echo " VirusTotal: https://www.virustotal.com/gui/domain/$DOMAIN"
|
||||
echo " Sucuri: https://sitecheck.sucuri.net/?scan=$DOMAIN"
|
||||
echo " Safe Browsing: https://transparencyreport.google.com/safe-browsing/search?url=$DOMAIN"
|
||||
|
||||
# 7. History Links
|
||||
echo -e "\n━━━ [7/7] Domain History ━━━"
|
||||
echo " Archive.org: https://web.archive.org/web/*/$DOMAIN"
|
||||
echo " ExpiredDomains: https://www.expireddomains.net/domain-name-search/?q=${DOMAIN%.*}"
|
||||
|
||||
echo -e "\n╔════════════════════════════════════════════════════════════╗"
|
||||
echo "║ Check Complete ║"
|
||||
echo "╚════════════════════════════════════════════════════════════╝"
|
||||
Reference in New Issue
Block a user