Get IPs of all WEDOS hosting webservers
This commit is contained in:
1 parent
c92d3dfb8f
commit
75c8db6c64
1 file changed
+21
+21
@@ -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"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user