def pingScan(tgtNet): for x in range(1, 20): ipAddress = tgtNet + '.' + str(x) delay = _ping.do_one(ipAddress, timeout=0.2) if delay !=None: upHosts.append(ipAddress) return upHosts
def pingScan(network): for ip in range(1,20): tgt = network + '.' + str(ip) delay = _ping.do_one(tgt, timeout=0.2) if delay !=None: cTgts.append(tgt) else: pass return cTgts