List all the IPs in the range 0/24

This commit is contained in:
David Mougeolle 2020-01-06 17:33:57 +01:00
parent e65207b567
commit fea3556ede

View file

@ -47,6 +47,11 @@ def __init__(self, iprange, verbose=False):
self.iprange = iprange
self.verbose = verbose
def list(self):
prefix = '.'.join(
self.iprange.split('.')[:-1])
self.list = [prefix + '.' + str(i) for i in range(256)]
def run(self, ip):
if self.verbose:
esc = chr(27)