#!/usr/bin/env python3 import os import random for i in range(100): a = random.randint(0, 360) print("spawn #%d +shoot %d" % (i, a)) os.system("echo %d | ncat 192.168.0.191 3490" % a)