def test_keys(self, filepath, expected): xml = self.create_xml(filepath) e = self.create_instance(xml) keys = [] for k in expected: keys.append(Key(self.create_xml(k))) assert compare_lists_equal(keys, e.get_keys())
def test_hostname(self, filepath, expected): xml = self.create_xml(filepath) e = self.create_instance(xml) hints = [] for a in expected: hints.append(HostHint(self.create_xml(a))) assert compare_lists_equal(e.get_host_hints(), hints)
def test_address(self, filepath, expected): xml = self.create_xml(filepath) e = self.create_instance(xml) addr = [] for a in expected: addr.append(HostAddress(self.create_xml(a))) assert compare_lists_equal(e.get_addresses(), addr)
def test_statuses(self, filepath, expected): xml = self.create_xml(filepath) e = self.create_instance(xml) statuses = [] for a in expected: statuses.append(Status(self.create_xml(a))) assert compare_lists_equal(e.get_statuses(), statuses)
def equals(self, other): return isinstance(other, Report) \ and self.__scanner == other.get_scanner() \ and self.__scanner_args == other.get_scanner_args() \ and self.__start == other.get_start() \ and self.__startstr == other.get_start_string() \ and self.__version == other.get_version() \ and self.__profile_name == other.get_profile_name() \ and self.__xmloutputversion == other.get_xml_output_version() \ and self.__verbose_level == other.get_verbose_level() \ and self.__debugging_level == other.get_debugging_level() \ and self.__run_stats.equals(other.get_run_stats()) \ and compare_lists_equal(self.__scaninfos, other.get_scaninfos()) \ and compare_lists_equal(self.__scaninfos, other.get_scaninfos()) \ and compare_lists_equal(self.__targets, other.get_targets()) \ and compare_lists_equal(self.__outputs, other.get_outputs()) \ and compare_lists_equal(self.__task_progresses, other.get_task_progresses()) \ and compare_lists_equal(self.__task_begins, other.get_task_begins()) \ and compare_lists_equal(self.__task_ends, other.get_task_ends()) \ and compare_lists_equal(self.__hosts, other.get_hosts()) \ and compare_lists_equal(self.__host_hints, other.get_host_hints()) \ and compare_script_maps(self.__pre_scripts, other.get_pre_scripts()) \ and compare_script_maps(self.__post_scripts, other.get_post_scripts())
def equals(self, other): return isinstance(other, SSHHostkey) \ and Script.equals(self, other) \ and compare_lists_equal(self.__keys, other.get_keys())
def equals(self, other): return isinstance(other, Script) \ and self.__id == other.get_id() \ and self.__output == other.get_output() \ and compare_lists_equal(self.__tables, other.get_tables()) \ and compare_lists_equal(self.__elements, other.get_elements())
def equals(self, other): return isinstance(other, Trace) \ and self.__proto == other.get_proto() \ and self.__port == other.get_port() \ and compare_lists_equal(self.__hops, other.get_hops())
def equals(self, other): return isinstance(other, OS) \ and compare_lists_equal(self.__used_ports, other.get_used_ports()) \ and compare_lists_equal(self.__os_matches, other.get_os_matches()) \ and compare_lists(self.__os_fingerprints, other.get_os_fingerprints())
def equals(self, other): return isinstance(other, HostHint) \ and compare_lists_equal(self.__statuses, other.get_statuses()) \ and compare_lists_equal(self.__addresses, other.get_addresses()) \ and compare_lists_equal(self.__hostnames, other.get_hostnames())
def equals(self, other): return isinstance(other, Host) \ and self.__start_time == other.get_start_time() \ and self.__end_time == other.get_end_time() \ and self.__status.equals(other.get_status()) \ and self.__comment == other.get_comment() \ and compare_lists_equal(self.__os, other.get_os()) \ and compare_lists_equal(self.__addresses, other.get_addresses()) \ and compare_lists_equal(self.__uptimes, other.get_uptimes()) \ and compare_lists_equal(self.__hostnames, other.get_hostnames()) \ and compare_lists_equal(self.__ports, other.get_ports()) \ and compare_lists_equal(self.__extraports, other.get_extraports()) \ and compare_lists_equal(self.__traces, other.get_traces()) \ and compare_lists_equal(self.__ipidsequences, other.get_ipid_sequences()) \ and compare_lists_equal(self.__tcpsequences, other.get_tcp_sequences()) \ and compare_lists_equal(self.__tcptssequences, other.get_tcpts_sequences()) \ and compare_lists_equal(self.__times, other.get_times()) \ and compare_lists(self.__distances, other.get_distances()) \ and compare_lists(self.__smurfs, other.get_smurfs()) \ and compare_script_maps(self.__hostscripts, other.get_host_scripts())
def equals(self, other): return isinstance(other, Table) \ and self.__key == other.get_key() \ and compare_lists_equal(self.__tables, other.get_tables()) \ and compare_lists_equal(self.__elements, other.get_elements())
def equals(self, other): return isinstance(other, OSMatch) \ and self.__name == other.get_name() \ and self.__accuracy == other.get_accuracy() \ and self.__line == other.get_line() \ and compare_lists_equal(self.__os_classes, other.get_os_classes())