def __init__( self, opts: options.Options, f: http.HTTPFlow, channel: controller.Channel, ) -> None: self.options = opts self.f = f f.live = True self.channel = channel super().__init__("RequestReplay (%s)" % f.request.url) self.daemon = True
def __init__( self, opts: options.Options, f: http.HTTPFlow, channel: controller.Channel, ) -> None: self.options = opts self.f = f f.live = True self.channel = channel super().__init__( "RequestReplay (%s)" % f.request.url ) self.daemon = True
def __init__(self, opts: options.Options, f: http.HTTPFlow, event_queue: typing.Optional[queue.Queue], should_exit: threading.Event) -> None: """ event_queue can be a queue or None, if no scripthooks should be processed. """ self.options = opts self.f = f f.live = True if event_queue: self.channel = controller.Channel(event_queue, should_exit) else: self.channel = None super().__init__("RequestReplay (%s)" % f.request.url)
def request(self, flow: HTTPFlow) -> None: self.count += 1 if ctx.options.debug: self._debug_request(flow) req = flow.request if ctx.options.script_mode == 'record': if ctx.options.detect_timestamps: self.run_all_key_detections(req) logging.info('updating problem_keys file at "{}"'.format(self.bad_keys_filepath)) self.update_problem_keys_file() elif ctx.options.script_mode in {'clean', 'playback'}: logging.info(f'flow.live is: {flow.live}') flow.live = False logging.info(f'mode={ctx.options.script_mode} cleaning problematic key values from the request') self.clean_bad_keys(req)
def __init__( self, opts: options.Options, f: http.HTTPFlow, event_queue: typing.Optional[queue.Queue], should_exit: threading.Event ) -> None: """ event_queue can be a queue or None, if no scripthooks should be processed. """ self.options = opts self.f = f f.live = True if event_queue: self.channel = controller.Channel(event_queue, should_exit) else: self.channel = None super().__init__( "RequestReplay (%s)" % f.request.url ) self.daemon = True