def main(): thread = Thread(target=sniffer) thread.start() while len(ip_addr)<100:attack() if(thread.isAlive()):thread._thread_stop() quit()