def main():

    parser = argparse.ArgumentParser()
    parser.add_argument('-p', '--port', type=int, default=4242, help='port used by workbench server')
    parser.add_argument('-s', '--server', type=str, default='tcp://127.0.0.1', help='location of workbench server')
    parser.add_argument('-l', '--listen', dest='listen', default=False, action='store_true', help='listen/monitor mode')
    args = parser.parse_args()
    port = str(args.port)
    server = str(args.server)
    listen = args.listen

    # Print out informative message
    print 'Dumping PCAPs to Workbench server. Use ^C to stop this script...'

    # Spin up workbench client
    workbench = zerorpc.Client(timeout=300, heartbeat=60)
    workbench.connect(server+':'+port)

    # Spin up our tcpdumper
    try:
        with TCPDumpToWorkbench(listen) as dumper:
            dumper.execute()
    except KeyboardInterrupt:
        print 'Exiting...'
        sys.exit()
dataset/ETHPy150Open SuperCowPowers/workbench/workbench/utils/pcap_streamer.py/main/original