Это оболочка, которую я создал: < /p>
Код: Выделить всё
#!/bin/bash
WORDLIST="dictionary2.txt"
OUTPUT_FILE="found_subdomains.txt"
TXT_FILE="txt_records.txt"
# Clear output files
> "$OUTPUT_FILE"
> "$TXT_FILE"
# Detect wildcard IP
wildcard_ip=$(dig +short thisshouldnotexist123456.penconsultants.com | tail -n1)
echo "[*] Wildcard IP detected: $wildcard_ip"
echo "[*] Running parallel subdomain resolution..."
# Main logic using xargs and inline Bash
cat "$WORDLIST" | xargs -P 20 -I{} bash -c '
sub="$1"
fqdn="${sub}.penconsultants.com"
ip=$(dig +short "$fqdn" | tail -n1)
if [ -n "$ip" ] && [ "$ip" != "'"$wildcard_ip"'" ]; then
echo "$fqdn -> $ip" >> "'"$OUTPUT_FILE"'"
txt=$(dig +short TXT "$fqdn")
if [ -n "$txt" ]; then
{
echo "===== $fqdn TXT Records ====="
echo "$txt"
echo ""
} >> "'"$TXT_FILE"'"
fi
fi
' _ {}
echo "[*] Finished!"
echo " → Found subdomains: $OUTPUT_FILE"
echo " → TXT records: $TXT_FILE"
Подробнее здесь: https://stackoverflow.com/questions/796 ... subdomains
Мобильная версия