def main():
    global socksPort
    global endflag
    try:
        if 3 >= len(sys.argv):
            if sys.argv[2]=='3':
                if len(sys.argv)==4:
                    socksPort = int(sys.argv[3])
                socket_bind(socksPort)
            elif sys.argv[2]=='1' and len(sys.argv)==5:
                socksProxy = startThreadSoket(socksPort)
                socksProxy.setDaemon(True)
                socksProxy.start()
                reproket('localhost',socksPort,sys.argv[3],sys.argv[4])
            elif sys.argv[2]=='2':
                if len(sys.argv)==7:
                    reproket(sys.argv[3],sys.argv[4],sys.argv[5],sys.argv[6])
                else:
                    usage()

        else:
            usage()
    except KeyboardInterrupt:
        print "Catch ctrl+c pressed,program will exit."
        for m in endflag:
            m = True
dataset/ETHPy150Open RicterZ/reprocks/client/reprocks_client.py/main/swapped operands of `>=`