{"id":20134346,"url":"https://github.com/modernistik/nmap-parser","last_synced_at":"2025-10-16T00:08:17.189Z","repository":{"id":666068,"uuid":"309194","full_name":"modernistik/Nmap-Parser","owner":"modernistik","description":"Parse nmap scan data with Perl  (official repo)","archived":false,"fork":false,"pushed_at":"2019-01-26T20:00:52.000Z","size":466,"stargazers_count":36,"open_issues_count":4,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-09T17:15:46.199Z","etag":null,"topics":["nmap","nmap-parser","perl"],"latest_commit_sha":null,"homepage":"http://search.cpan.org/~apersaud/Nmap-Parser/Parser.pm","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modernistik.png","metadata":{"files":{"readme":"README.md","changelog":"Changes.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-09-16T21:56:28.000Z","updated_at":"2024-05-03T23:06:39.000Z","dependencies_parsed_at":"2022-07-07T18:40:23.896Z","dependency_job_id":null,"html_url":"https://github.com/modernistik/Nmap-Parser","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernistik%2FNmap-Parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernistik%2FNmap-Parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernistik%2FNmap-Parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernistik%2FNmap-Parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modernistik","download_url":"https://codeload.github.com/modernistik/Nmap-Parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074920,"owners_count":21043490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nmap","nmap-parser","perl"],"created_at":"2024-11-13T21:09:13.959Z","updated_at":"2025-10-08T16:05:20.883Z","avatar_url":"https://github.com/modernistik.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nmap-Parser\nParse nmap scan data with perl.\n\nThis module implements a interface to the information contained in an nmap scan. It is implemented by parsing the xml scan data that is generated by nmap. This will enable anyone who utilizes nmap to quickly create fast and robust security scripts that utilize the powerful port scanning abilities of nmap.\n\nSee *[API Reference](http://search.cpan.org/~apersaud/Nmap-Parser/Parser.pm)*\n\nThe latest version of this module can be found on here [http://modernistik.github.com/Nmap-Parser/](http://modernistik.github.com/Nmap-Parser/)\n\n### Code Status\n[![CPAN version](https://badge.fury.io/pl/Nmap-Parser.svg)](http://search.cpan.org/~apersaud/Nmap-Parser/Parser.pm)\n[![Build Status](https://travis-ci.org/modernistik/Nmap-Parser.svg?branch=master)](https://travis-ci.org/modernistik/Nmap-Parser)\n\n## Overview\nHere is a small example on how to use the module. You can view the more detailed API and examples in the POD documentation.\n\n```perl\n    use Nmap::Parser;\n    my $np = new Nmap::Parser;\n\n    $np-\u003eparsescan($nmap_path, $nmap_args, @ips);\n    #or\n    $np-\u003eparsefile($file_xml);\n\n    my $session    = $np-\u003eget_session();\n    my $host       = $np-\u003eget_host($ip_addr);\n    my $service = $host-\u003etcp_service(80);\n    my $os         = $host-\u003eos_sig();\n```\n\nAnother method is to setup callbacks for each section.\n\n```perl\n    my $np2 = new Nmap::Parser;\n\n    $np2-\u003ecallback(\\\u0026my_callback);\n\n    $np2-\u003eparsefile($file_xml);\n    #or\n    $np2-\u003eparsescan($nmap_path, $nmap_args, @ips);\n\n    sub my_callback {\n\t    my $host = shift; #Nmap::Parser::Host object\n    \t#.. see documentation for all methods ...\n    }\n```   \n\n## CPAN Installation (recommended)\nThe easiest way to install a Perl module is to use span. Run this in the command prompt to install directly from CPAN (may need root priviledges):\n\n```bash\n\t$ perl -MCPAN -e 'install Nmap::Parser'\n\t# or cpan bin\n\t$ cpan install Nmap::Parser\n```\n\n## Manual Install\nDownload the file and unpack. This is usually done by:\n\n\t$ tar zxvf Nmap-Parser-x.xx.tar.gz\n\nWhere x.xx is the version number. Next change into the newly created directory. To install this module type the following:\n\n  $ cpanm --quiet --installdeps --notest .\n\t$ perl Makefile.PL\n\t$ make\n\t$ make test\n\t$ make install\n\nIf you would like to install Nmap-Parser in a different directory (or if you do\nnot have root access use `perl Makefile.PL PREFIX=/install/path`, where\n`/install/path` is the directory in which you want to install the module. Note\nthat you should then use the \"use lib '/install/path'\" in your scripts.\n\n## ActiveState Perl (Windows only)\nTo install it on Windows, you may need to have installed the ActiveState Perl Package Manager (PPM). Run this in the command prompt:\n\n\tppm install Nmap-Parser\n\nThis should contact the ActiveState respository, download the file and install it automagically.\n\n### Dependencies\nThis module requires these other modules and libraries:\n\n* XML::Twig 3.16+\n* Storable (comes with Perl 5+)\n\nIn addition, you will need nmap 3.00+. You don't exactly need it, but this\nversion of nmap supports the xml output that this module can parse. So, you do\nnot really need the executable, but the xml output that you will be parsing\n(or able to parse), must be from this version onward.\n\n### Issues, Bugs and Feature Requests\nPlease submit any bugs or feature requests to: [https://github.com/modernistik/Nmap-Parser/issues](https://github.com/modernistik/Nmap-Parser/issues)\n\nPlease make sure that you submit the xml-output file of the scan which you are having\ntrouble with. This can be done by running your scan with the `-oX filename.xml` nmap switch. Please remove any important IP addresses for security reasons. It saves time in reproducing issues.\n\n### Releasing\nTo release a new version of the module, update the version number in Parser.pm and type the following commands:\n\n  $ perl Makefile.PL\n  $ make\n  $ make test\n  $ make dist\n\nThis will generate a `tar.gz` to upload to https://pause.perl.org.\n\n### Copyright and License\nCopyright (C) 2003-2018 Anthony Persaud [https://www.modernistik.com](https://www.modernistik.com)\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernistik%2Fnmap-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodernistik%2Fnmap-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernistik%2Fnmap-parser/lists"}