README.md
# Documentation * It generate a chosen number of IPs. * The number is limited by 255. * It let you choose one of it . * Can be passed to a variable. * It checks wether * the IP is valid * the IP gets a ping back * behind the IP stands a Router
genip.src
SelectPublicIP = function(NBofIP) Address = [] progress = [] range = range(0,255) range.shuffle for first in range range.shuffle for second in range range.shuffle for third in range range.shuffle for fourth in range CalcIP = first+"."+second+"."+third+"."+fourth if is_valid_ip(CalcIP) and get_router(CalcIP) and get_shell.ping(CalcIP) then print(char(10)*50) Address.push(CalcIP) progress.push(".") print("Generating List of IPs\n") print(progress.join("")) print(char(10)*11) else continue end if if typeof(NBofIP) != "number" then exit("Param is not a number..") NBofIP = NBofIP - 1 if Address.indexes[-1] == NBofIP and typeof(NBofIP) == "number" then clear_screen info = " " option = "" for x in Address.indexes option = x + 1 info = info+"\n"+option+" "+Address[x] end for print("Choose IP" ) print(format_columns(info)+"\n") nb = user_input("Number: ").to_int if typeof(nb) == "number" and nb <= 9 and nb >= 1 then nb = nb - 1 return Address[nb] end if break end if break end for break end for break end for continue end for end function IP = SelectPublicIP(3) print(IP)