Exemplo n.º 1
0
Arquivo: start.py Projeto: Terrycy/MAD
        # Do not remove this sleep unless you have solved the race condition on boot with the logger
        time.sleep(.1)

        jobstatus: dict = {}
        MitmMapperManager.register('MitmMapper', MitmMapper)
        mitm_mapper_manager = MitmMapperManager()
        mitm_mapper_manager.start()
        mitm_mapper: MitmMapper = mitm_mapper_manager.MitmMapper(
            mapping_manager, db_wrapper.stats_submit)

        from mapadroid.ocr.pogoWindows import PogoWindows

        pogoWindowManager = PogoWindows(args.temp_path, args.ocr_thread_count)

        mitm_receiver_process = MITMReceiver(args.mitmreceiver_ip,
                                             int(args.mitmreceiver_port),
                                             mitm_mapper, args,
                                             mapping_manager, db_wrapper)
        mitm_receiver_process.start()

        logger.info('Starting websocket server on port {}'.format(
            str(args.ws_port)))
        ws_server = WebsocketServer(args,
                                    mitm_mapper,
                                    db_wrapper,
                                    mapping_manager,
                                    pogoWindowManager,
                                    data_manager,
                                    event=event)
        t_ws = Thread(name='scanner', target=ws_server.start_server)
        t_ws.daemon = False
        t_ws.start()
Exemplo n.º 2
0
        mitm_mapper = mitm_mapper_manager.MitmMapper(args, mapping_manager,
                                                     db_wrapper.stats_submit)

    logger.info('Starting PogoDroid Receiver server on port {}'.format(
        str(args.mitmreceiver_port)))

    mitm_data_processor_manager = MitmDataProcessorManager(
        args, mitm_mapper, db_wrapper)
    mitm_data_processor_manager.launch_processors()

    mitm_receiver_process = MITMReceiver(
        args.mitmreceiver_ip,
        int(args.mitmreceiver_port),
        mitm_mapper,
        args,
        mapping_manager,
        db_wrapper,
        data_manager,
        storage_elem,
        mitm_data_processor_manager.get_queue(),
        enable_configmode=args.config_mode)
    mitm_receiver_process.start()

    logger.info('Starting websocket server on port {}'.format(str(
        args.ws_port)))
    ws_server = WebsocketServer(args=args,
                                mitm_mapper=mitm_mapper,
                                db_wrapper=db_wrapper,
                                mapping_manager=mapping_manager,
                                pogo_window_manager=pogo_win_manager,
                                data_manager=data_manager,