Changeset 834
- Timestamp:
- 06/18/07 21:43:33 (6 years ago)
- Files:
-
- 1 modified
-
branch/joao/umitCore/NmapParser.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branch/joao/umitCore/NmapParser.py
r449 r834 362 362 return host.comment 363 363 else: 364 raise Exception("Comment could not be saved! Host not found at NmapParser!")364 raise Exception("Comment could not be loaded! Host not found at NmapParser!") 365 365 366 366 def get_profile(self): … … 862 862 def _parse_host_ipidsequence(self, attrs): 863 863 self.host_info.set_ipidsequence(self._parsing(attrs, ['class', 'values'])) 864 865 # NOTE: Added by ignotus 866 def _parse_host_trace(self, attrs): 867 self.host_info.set_trace(self._parsing(attrs, ['port', 'proto'])) 868 869 # NOTE: Added by ignotus 870 def _parse_host_trace_hop(self, attrs): 871 self.list_hop.append(self._parsing(attrs, ['ttl', 'rtt', 'ipaddr', 'host'])) 864 872 865 873 def startElement(self, name, attrs): … … 923 931 self._parse_host_ipidsequence(attrs) 924 932 933 # Creating a traceroute condition 934 # NOTE: Added by ignotus 935 elif self.in_host and name == "trace": 936 self.in_trace = True 937 self.list_hop = [] 938 self._parse_host_trace(attrs) 939 940 elif self.in_trace and name == "hop": 941 self._parse_host_trace_hop(attrs) 942 925 943 926 944 def endElement(self, name): … … 949 967 del(self.list_portused) 950 968 del(self.list_osclass) 969 970 # Creating a traceroute condition 971 # NOTE: Added by ignotus 972 elif self.in_host and name == "trace": 973 self.in_trace = False 974 self.host_info.set_hops(self.list_hop) 975 976 del(self.list_hop) 977 951 978 952 979 def write_xml(self, xml_file):
