#!/bin/bash #Coded By sTrong static='https://udger.com/resources/datacenter-list/datacenter-detail?name=' #======== COLORS ====================== RED='' GRN='' RES='' #====================================== #===== RANGES ========================= amazon="amazon_aws" microsoft_azure="microsoft_azure" softlayer="softlayer" ovh="ovh" digital="digitalocean" godaddy="godaddy" alicloud="alicloud" linode="linode" rackspace="rackspace" #====================================== #======= MENIU ========================= echo " Select ranges: Ps: Acest script este facut de el 100% chiar daca unii nu o sa creada asta" echo " ${RED}Muie la copiatori!! Joes este nr 1" echo " ${RED}1.${GRN}Clase Amazon${RES} ${RED}2.${GRN}Clase Microsoft Azure${RES}" echo " ${RED}3.${GRN}Clase Softlayer${RES} ${RED}4.${GRN}Clase OVH${RES}" echo " ${RED}5.${GRN}Clase Digital${RES} ${RED}6.${GRN}Clase GoDaddy${RES}" echo " ${RED}7.${GRN}Clase Cloud${RES} ${RED}8.${GRN}Clase Linode${RES}" echo " ${RED}9.${GRN}Clase ROckSpace${RES}" echo -n "#?>" read answer #====================================== utility="-O data -o log -t 2 --no-check-certificate" clear="rm -rf data log" #======= Resurse ====================== echo "Downloadare resurse... " case "$answer" in 1) wget ${static}${amazon} ${utility} ;; 2) wget ${static}${microsoft_azure} ${utility} ;; 3) wget ${static}${softlayer} ${utility} ;; 4) wget ${static}${ovh} ${utility} ;; 5) wget ${static}${digital} ${utility} ;; 6) wget ${static}${godaddy} ${utility} ;; 7) wget ${static}${alicloud} ${utility} ;; 8) wget ${static}${linode} ${utility} ;; 9) wget ${static}${rackspace} ${utility} ;; *) echo "${RED}Error${RES}: Range not found" exit esac if [ -f data ]; then warn="${GRN}Complete!" else warn="${RED}Fail!" fi echo "${GRN}Downloadare $warn ${RES}" echo "Generate Ip Ranges... " cat data | grep ''| cut -d '>' -f 3| cut -d 'x' -f1| grep -v ':'|grep -v '<'|sort | uniq | cut -d "." -f1,2 > ip found=$(cat ip |wc -l) echo "Generarea de ip-uri finalizata!${found} ranges found" $clear