1Revision history for Perl extension Nmap::Parser. 2 3Bleeding Edge version: https://github.com/modernistik/Nmap-Parser 4 5For a full list of changes and contributors see: https://github.com/modernistik/Nmap-Parser/commits/master 6 7### Changes for 1.37 8 - Added starttime attributes and subroutine thanks to @jcrochon (PR #19) 9 10### Changes for 1.35 11 - Updated build configuration thanks to @mperry2 (PR #17) 12 13### Changes for 1.34 14 - Added devicetype thanks to @jcrochon (PR #16) 15 16### Changes for 1.33 17 - Add tcp_port_state_ttl() function for export from nmap xml results. Thanks to @matrix. 18 - Document fixes thanks to @zOrg1331 19 20### Changes for 1.32 21 - Updated website: https://github.com/modernistik/Nmap-Parser 22 - Eliminate global variables %D - thanks to bonsaiviking 23### Changes for 1.30 24 - Merged features of pull request #6 (bonsaiviking) 25 https://github.com/modernistik/Nmap-Parser/commit/7ccf752af 26 - Allow osclass elements within osmatch, Nmap XML format changed in 6.00 27 28### Changes for 1.21 29 - Added support for hostscript and script tags 30 - Changed ipv4_sort() to use a 10x faster sort method 31 32### Changes for 1.20 33 - Solved Issue 2: Host-specific start_time and end_time. 34 - Applied Patch provided by briandlong on retrieving start_time and end_time attributes for host. 35 - Solved Issue 6: \_del_port not removing port 0. 36 - Thomas Equeter submitted patch to support traceroute in nmap output. 37 38### Changes for 1.19 39 - Added enhancement request by stevekatieterabyte for tcp_del_port and udp_del_port 40 (Thanks!). Modified the patch to work with a list of ports. 41 - Added Robin Bowes' modification of nmap2sqlite as nmap2db to support MySQL (Thanks!) 42 43### Changes for 1.16 44 - Fixed minor bug in scanner.t where the number of tests to skip when nmap was not found was incorrect. 45 - Repackaged to remove all the .\_* files from the package. 46 - Fixed POD errors and added more documentation 47 48### Changes for 1.14 49 - Added cache_scan() to save the output of a parsescan() to a file before parsing. 50 - Added new tests for servicefp fingerpriting and cache_scan(). 51 - Ran PerlTidy against module and other tools 52 - Updated documentation 53 54### Changes for 1.13 55 - Added fingerprint() to Service object (thanks jpomiane) 56 - Added documentation. 57 58### Changes for 1.12 59 - Added references to Google Code Project page. 60 61### Changes for 1.11 62 - Added parsing of distance information. 63 - Fixed bug #1671876 on tcp_service() always returning null 64 - Added ignoring of taskend,taskbegin and taskprogress information. 65 - Added tests for nmap 4.20. 66 - Changed lisence to MIT. 67 68### Changes for 1.06 69 - Added patch for new OS fingerprint (Thanks Okan Demirmen) 70 - New os_fingerprint() method for Nmap::Parser::Host::OS 71 - Updated documentation 72 - Updated scan.pl to also read xml files (good for debugging) 73 74### Changes for 1.05 75 - Major speed improvements (less compile time) 76 - Major reduction in unwanted memory usage 77 - Redundant functions (or less used functions) are now created dynamically. (AUTOLOAD) 78 - Documentation fixes 79 80### Changes for 1.00 81 - To see the changes, please read over the new documentation 82 - Internal code is much (MUCH) cleaner and readable 83 - removed 'ducttape' fixes and made stable & roubust changes 84 - improved performance, removed unwanted code (legacy) 85 - complete overhaul of internal code - new Framework 86 - support for IPv6 addresses 87 - data overwrite (overflow) protection 88 - better support for multiple instances 89 - fixed some minor bugs 90 - process owner information obtained 91 - all OS accuracy information obtained 92 - some functions now take new parameters (more concise) 93 - some functions renamed for clarity 94 - new shortcut functions (for doing repetitive tasks easier) 95 - Removed parsing filters (finally) 96 - All indexes now start at 0 (not at 1). 97 - Removed internal OS generic matching function since this is given by 98 nmap now in the osclass tags 99 - Removed the use of constants for indexes 100 - Nmap::Parser::Host::Service object 101 provides OO interface to service information for a given port 102 - Nmap::Parser::Host::OS object 103 provides OO interface to OS signature information for a given host 104 - Nmap::Parser::Session replaces old Nmap::Parser::ScanInfo package 105 - Nmap2SQLite security script included 106 - removed old security tools 107 - rewrote scan.pl (from scanhost.pl) 108 - rewrote old tools to fit new framework 109 - Fully updated documentation 110 111### Changes for 0.80 112 - Support for multiple instances of Nmap::Parser objects without overwriting data 113 - All data (except filters) is are localized per object 114 - The use of Storable (dclone) to correctly make duplicate of data structured 115 - When filters are used to skip portinfo, all ports return state of 'closed'. 116 - Nmap::Parser::XML no longer supported in distribution 117 (you should change all calls to Nmap::Parser::XML to Nmap::Parser) 118 119### Changes for 0.79 120 - fixed ports that were declared as 'open|filtered' 121 these now are counted as both 'open' and 'filtered' 122 when using tcp_ports() and udp_ports(). 123 - sent a patch for XML::Twig in order to fix. It is now released in 124 XML:Twig 3.16 125 - added start_str() and time_str() : they return the human readable format 126 of the scan start time and scan finish time (respectively). 127 - updated for Nmap 3.81 128 - documentation changes 129 130### Changes for 0.78 131 - updated documentation - now included tcp/udp service product 132 - added new methods for new nmap command switch (-A) 133 mac_addr, mac_vendor, ipv4_addr 134 - verified xml format is still valid for nmap 3.55 135 136### Changes for 0.77 137 - updated documentation 138 - added patches from Jeremy S. 139 - tcp_service and udp_service tunnel, accuracy, confidence 140 - os_accuracy method implemented 141 - added ident/owner information 142 143### Changes for 0.76 144 - new module name: Nmap::Parser 145 - leagcy file still ok to use for now: Nmap::Parser::XML 146 - fixed problem using 'our' with older versions of perl 147 - updated requirement for oldest usable version of XML::Twig => 3.11 148 - you can extract owner information from running -I scanning 149 tcp_service_owner and udp_service_owner 150 151### Changes for 0.74 152 - fixed ip address input bug 153 - updated example scripts 154 - fixed nmap not found bug 155 - updated authorship informatin 156 - raised verbose level to 2 in example scripts (help pages) 157 - test script 4_scanner does not test. If nmap not installed 158 it skips all tests. 159 - updated tests 160 - some example scripts read IP addresses from file 161 - placed sourceforge image link on documentation 162 - status_check is now called sweep 163 - sweep.pl outputs active IP's to a file with a new command line switch 164 - scan_host.pl is renamed to scanhost.pl 165 - get_host_list,filter_by_osfamily, filter_by_status returns IP 166 addresses in sorted IP order. ( uses sort_ips() ) 167 - sort_ips is a new function which will take a series of IPs and sort 168 them correctly by comparing each quad in the address to each 169 other. 170 - example scripts use --randomize_hosts to be more stealthy 171 - updated information on some example scripts because they require 172 nmap 3.50+ for the version scanning. 173 - updated parser tests, to check for sorted ip order 174 175### Changes for 0.73 176 - removed safe_* functions and placed them in the actual parsing 177 functions. (I don't think they were never used. 178 - updated BUG REPORT information 179 180### Changes for 0.72 181 - removed IGNORE_ADDPORTS constant 182 - added contribution from Sebastian: nmap2csv. 183 - edited the links to the sourceforge project site. 184 - added parsescan() function to peroform quick nmap scans 185 and parsing. 186 - added more documentation 187 - fixed some example scripts 188 - added more tests for the new functionality 189 190### Changes for 0.71 191 - fixed a small bug in the installation under MSWin32 (PM_FILTER) which 192 caused all tests to fail. (It was removing things that weren't comments. 193 194### Changes for 0.70 195 - updated changes from 0.69 196 - updated documentation 197 - fixed documentation bug of all the example scripts 198 - updated examples script: they are more robust. Can either take 199 the example file as input, or actually run scans. 200 201### Changes for 0.69 202 - new utility script : scan_host.pl 203 - added EXAMPLES seciton in documentation 204 - parses new 'version', 'extrainfo', and 'product' 205 att from service tag (3.40+) 206 - added \*\_service_version to \*::Host 207 - added xml_version to \*::ScanInfo 208 - more error prevention mechanisms 209 - added os_osfamily, os_gen, os_vendor, os_type added 210 - added OSINFO filter 211 - ::ScanInfo::scan_types does not return number of scan types in scalar 212 format. It will always return an array containing the scan 213 types. 214 - osfamily does not return the actual string (comma delimited), it always 215 returns an array of os matches. 216 - DEPRECATED: tcpsequence, ipidsequence, tcptssequence 217 now use: 218 tcpsequence_class, tcpsequence_values, tcpsequence_index 219 ipidsequence_class, ipidsequence_values 220 tcptssequence_class, tcptssequence_values 221 222 223### Changes for 0.68 224 - Licensing changes, now under GPL 225 - added signatures for wireless access points (wap) 226 - added os_match shortcut function 227 - Problem with Makefile.PL, didn't pass correct dependencies. 228 - tcp_port_state() and udp_port_state() return the state of the port 229 when passed a port number. 230 - Sorted port order when using tcp_ports and udp_ports 231 - extraports tag parsing. It is also set up as a filter 'extraports' 232 filtering. Added extraports_state and extraports_count to 233 Nmap::Parser::Host class. 234 - Added and fix some documentation 235 - tcp_ports and udp_ports can take a parameter to filter what port list 236 you wish to receive. It selects states based on port content 237 state tag: filtered, closed, or open 238 - previous versions (0.64 or earlier) of the parser, no arguments 239 to tcp_ports and udp_ports would return the whole hashref of all the 240 ports, this is now deprecated. Use the newly created functions 241 tcp_service_name, tcp_service_proto, tcp_service_rpcnum, 242 udp_service_name, udp_service_proto, and udp_service_rpcnum. 243 - changed default filter for solaris to include 'sun' and not 'sunos' 244 - more example scripts 245 - no more wantarray usage for tcp_ports and udp_ports 246 - more test cases 247 248### Changes for 0.66 249 - added short-cut function hostname() to return first hostname 250 - added preliminary callback functionality (for registering events). 251 This includes register_host_callback, and reset_host_callback 252 - tcp_ports and udp_ports do not return hashref of all ports, only if 253 passed a port number as an argument.The argument must be a port 254 number. They default to returning an array of port numbers. 255 - added short-cuts tcp_ports_count and udp_ports_count functions 256 - added tcp_service_proto and udp_service_proto 257 - added tcp_service_rpcnum and udp_service_rpcnum 258 - POD fixes. 259 - speed improvements 260 261### Changes for 0.64 262 - nmaprun filter bug fixed 263 - important documentation changes 264 265### Changes for 0.63 266 - added vendor to os_class 267 - fixed division by zero on one of the efficiency test. 268 - it now checks to make sure Time::HiRes is installed before 269 performing tests. 270 - minor warning problems removed on Win32 systems. 271 272### Changes for 0.62 273 - stable release with all new changes. 274 275### Changes for 0.6_4 276 - changes to parse filter tags. All previously called PARSE_* have 277 the PARSE_ removed from them. Ex: PARSE_OSFAMILY is now 278 OSFAMILY. 279 - osclass tag added. 280 - a bug found with the sequences is fixed 281 - making use of ignore_elts to save when creating objects 282 - parse_filters completly excludes tags that you decide not to parse. 283 Much faster parsing and memory usage efficiency. efficiency.t 284 tests this benchmark to make sure that the twig parser does not 285 do any work it doesn't have to. 286 - permanently excluding some static tags using ignore_elts. 287 - added SCANINFO filter. 288 289### Changes for 0.60_3 290 - os_port_used, now can return the open or closed port used in OS 291 detection depending on the given parameter. 292 293### Changes for 0.60_2 294 - Bug #2968: 295 fixed bogus 'use 5.008' in Makefile.PL (runs on 5.6 also) 296 instead using 5.004 297 fixed minor warnings when compiling with -w 298 added 'use warnings' to \_methods test 299 300### Changes for 0.60_1 301 - fixed a bug with the test script (finding test file) 302 - made a separate test to test the actual method existance 303 - portability when running the tests using File::Spec. 304 305### Changed for 0.60 306 - better memory management using twig_roots 307 - some bugs with output types and filters 308 - generic_os and all references are now refereed to as 'osfamily' 309 I thought it better resembles what it stands for. 310 - fixed some documentation problems 311 - parse_filter_* have been replaced with parse_filters(), which 312 can enable multiple different filters through a hashref. 313 Filters available: 314 ONLY_ACTIVE, PARSE_OSFAMILY, PARSE_UPTIME, PARSE_PORTINFO, 315 PARSE_SEQUENCES 316 - added parse information of 317 tcpsequence, ipidsequence, tcptssequence 318 - additions to Nmap::Parser::Host methods 319 tcpsequence, ipidsequence, tcptssequence 320 321### Changes for 0.50 322 - faster loading module 323 - added more documentation 324 - minor speed improvements 325 - added methods to Nmap::Parser 326 parse_filter_generic_os($bool) (see doc) 327 - renamed only_active() to parse_filter_status($bool) (see doc) 328 - Nmap::Parser::Host 329 changed hostnames() to take a value a number (see doc) 330 changed os_matches() to take a value a number (see doc) 331 332### Changes for 0.40 333 - added new package called ScanInfo (Nmap::Parser::ScanInfo 334 this contains methods that make it easier to access the 335 scan information 336 - added new package called Host (Nmap::Parser::Host), 337 which makes it easier to access values for each of the 338 hosts found. See documentation. 339 Host trees are now full of these \*::Host objects. 340 - fixed minor bugs with parsing the xml files. 341 - some memory usage improvements. 342 343COPYRIGHT AND LICENSE 344 345Copyright (C) 2003-2017 Anthony Persaud L<https://www.modernistik.com> 346 347MIT License 348 349Permission is hereby granted, free of charge, to any person obtaining a copy 350of this software and associated documentation files (the "Software"), to deal 351in the Software without restriction, including without limitation the rights 352to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 353copies of the Software, and to permit persons to whom the Software is 354furnished to do so, subject to the following conditions: 355 356The above copyright notice and this permission notice shall be included in 357all copies or substantial portions of the Software. 358 359THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 360IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 361FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 362AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 363LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 364OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 365THE SOFTWARE. 366