Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- EU=($(wget -U "Mozilla/5.0" -qO- "https://lite.ip2location.com/ip-address-ranges-by-country" | \
- grep "ip-address-ranges" | grep -Po '(?<=href=")[^"]*(?=")' | \
- sed '1d;$d' | xargs -I {} echo "https://lite.ip2location.com{}" | \
- grep -e russia -e ukraine -e france -e spain -e sweden -e norway -e germany -e finland -e poland \
- -e italy -e united-kingdom -e romania -e belarus -e kazakhstan -e greece -e bulgaria -e iceland -e hungary \
- -e portugal -e austria -e czech -e serbia -e ireland -e lithuania -e latvia -e croatia -e bosnia -e slovakia -e estonia \
- -e denmark -e switzerland -e netherlands -e moldova -e belgium -e armenia -e albania -e macedonia -e turkey -e slovenia \
- -e montenegro -e kosovo -e cyprus -e azerbaijan -e luxembourg -e georgia -e andorra -e malta -e liechtenstein -e san-marino -e monaco -e vatican))
- for c in "${EU[@]}"; do
- wget -U "Mozilla/5.0" --no-cache -qO- "$c" | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | awk '{getline subnet; printf("%s-%s\n", $0,subnet)}' >> out.txt
- echo "DONE: $c"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement