def get_speed(): global f while True: speed = net_stat.getInterfaceSpeed('h1-eth0') f.write(str(speed[1])) f.write('\n') f.flush() time.sleep(0.5)
def get_speed(): global f while True: speed=net_stat.getInterfaceSpeed('h1-eth0') f.write(str(speed[1])) f.write('\n') f.flush() time.sleep(0.5)
def victim(eth): speed = net_stat.getInterfaceSpeed(eth) if speed[1] > basicSpeed: return 1 else: return 0
def victim(eth): speed=net_stat.getInterfaceSpeed(eth) if speed[1]>basicSpeed: return 1 else : return 0