Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
def victim(eth):
    speed = net_stat.getInterfaceSpeed(eth)
    if speed[1] > basicSpeed:
        return 1
    else:
        return 0
Beispiel #4
0
def victim(eth):
    speed=net_stat.getInterfaceSpeed(eth)
    if speed[1]>basicSpeed:
        return 1
    else :
        return 0