From 75c8db6c6487e9493da3ace2e0ffc92d841eff81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Stach?= Date: Thu, 26 Jun 2025 13:47:47 +0200 Subject: [PATCH] Get IPs of all WEDOS hosting webservers --- wed_h_ip.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 wed_h_ip.sh 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" +} +