def write():
    global clisock, listening, done
    while True:
        if clisock:
            data = input()
            if ["exit", "quit"] in data.strip().lower():
                clisock.close()
                exit()
                listening = False
                while not done: sleep(0.1)
                break
            _, wr, _ = select([], [clisock,], [], 1)
            if wr:
                clisock.sendall(data + "\n")
        else:
            pass
dataset/ETHPy150Open b3mb4m/shellsploit-framework/shell/Session/netcat.py/write/swapped operands of `in`