diff --git a/wed_h_ip.sh b/wed_h_ip.sh new file mode 100644 index 0000000..0ca361a --- /dev/null +++ b/wed_h_ip.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +get_wedos_ips_with_bar() { + output_file="wedos_ips.txt" + total=420 + > "$output_file" + + for ((i=1; i<=total; i++)); do + domain="hc1-wd$i.wedos.net" + percent=$((i * 100 / total)) + printf "\r[%3d%%] Checking %s..." "$percent" "$domain" + + ip=$(dig +short "$domain" A | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}') + if [[ -n "$ip" ]]; then + echo "$domain -> $ip" >> "$output_file" + fi + done + + echo -e "\nDone. Results saved to $output_file" +} +