def __init__(self, proxy): self._proxy = proxy self._transport = None self._peername = None self._logger = get_default_logger() self._traffic_logger = get_traffic_logger() super().__init__()
def __init__(self, remote_address, fuzzer): self._remote_address = remote_address self._proto_module = fuzzer.codec self._fuzzing_engine = fuzzer.fuzzing_engine self._remotes = {} self._transport = None self._logger = get_default_logger() self._traffic_logger = get_traffic_logger() super().__init__()
def __init__(self, protocol: ProtocolDescription, message): self._identifier = 'msg_' + str(AbstractMessage.id_counter) self._logger = get_default_logger() self._protocol = protocol self._message = message self._payload = None self._payload_changed = None # saves encoding cycle if nothing changed # static counter for numbering messages AbstractMessage.id_counter += 1
def ssh_monitor(args): logger = get_default_logger() remote_host = args.remote_host pid = args.pid username = args.user # TODO: still required? # KNOWN_HOSTS = '~/.ssh/known_hosts' # known_hosts = os.path.expanduser(KNOWN_HOSTS) mon = SUTMonitor(pid, remote_host, username) mon.start() try: mon.join() except KeyboardInterrupt: logger.info('Caught KeyboardInterrupt: closing monitoring') mon.stop()
def __init__(self, rules_list): self._complete_rule_list = rules_list self._all_rules = list() self._request_rules = list() self._response_rules = list() self._logger = get_default_logger() for r in rules_list: if r.direction == FilterDirection.ALL: self._request_rules.append(r) self._response_rules.append(r) self._all_rules.append(r) elif r.direction == FilterDirection.REQUEST: self._request_rules.append(r) elif r.direction == FilterDirection.RESPONSE: self._response_rules.append(r) else: raise Exception('Filter direction {} is unknown'.format( r.direction))
def __init__(self, log_dir): self._log_dir = log_dir self._rules = dict() self._logger = get_default_logger()
def __init__(self, idx, identifier, match_filter: AbstractFilter): self._idx = idx self._identifier = identifier self._filter = match_filter self._logger = get_default_logger()