Files
Jiří Stach 2a65cdda3f
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Calling the func.
2025-06-26 14:50:03 +02:00

23 lines
541 B
Bash

#!/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"
}
get_wedos_ips_with_bar