{"id":17060165,"url":"https://github.com/jas-/node-libnmap","last_synced_at":"2025-04-05T07:06:55.399Z","repository":{"id":12964227,"uuid":"15642641","full_name":"jas-/node-libnmap","owner":"jas-","description":"API to access nmap from node.js","archived":false,"fork":false,"pushed_at":"2022-03-08T21:54:03.000Z","size":2817,"stargazers_count":258,"open_issues_count":7,"forks_count":42,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-29T06:08:01.308Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jas-.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-05T00:39:41.000Z","updated_at":"2025-02-27T05:37:57.000Z","dependencies_parsed_at":"2022-09-16T13:22:10.732Z","dependency_job_id":null,"html_url":"https://github.com/jas-/node-libnmap","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jas-%2Fnode-libnmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jas-%2Fnode-libnmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jas-%2Fnode-libnmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jas-%2Fnode-libnmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jas-","download_url":"https://codeload.github.com/jas-/node-libnmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"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":[],"created_at":"2024-10-14T10:36:23.875Z","updated_at":"2025-04-05T07:06:55.380Z","avatar_url":"https://github.com/jas-.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libnmap \n\nAPI to access nmap from node.js\n\n[![npm](https://img.shields.io/npm/v/libnmap.svg)](https://npmjs.com/package/libnmap) [![Build Status](https://travis-ci.org/jas-/node-libnmap.png?branch=master)](https://travis-ci.org/jas-/node-libnmap) [![Dependencies](https://img.shields.io/david/jas-/node-libnmap.svg)](https://david-dm.org/jas-/node-libnmap) ![Downloads](https://img.shields.io/npm/dm/libnmap.svg) [![Known Vulnerabilities](https://snyk.io/test/github/jas-/node-libnmap/badge.svg?targetFile=package.json)](https://snyk.io/test/github/jas-/node-libnmap?targetFile=package.json)\n\n\n## install ##\n\nTo install `npm install libnmap`\n\n## methods ##\n\n* `scan`      Performs scan given available range \u0026 optional port\n* `discover`  Retrieves list of online network neighbors\n\n## options ##\n\n* `nmap`      {String}    Path to NMAP binary\n* `verbose`   {Boolean}   Turn on verbosity during scan(s)\n* `ports`     {String}    Range of ports to scan\n* `range`     {Array}     An array of hostnames/ipv4/ipv6, CIDR or ranges\n* `timeout`   {Number}    Number of seconds to wait for host/port response\n* `blocksize` {Number}    Number of hosts per network scanning block\n* `threshold` {Number}    Max number of  spawned process\n* `flags`     {Array}     Array of flags for .spawn()\n* `udp`       {Boolean}   UDP scan mode enabled\n* `json`      {Boolean}   JSON object as output, false produces XML\n\n## tests ##\n\nTo test `npm test`\n\n## examples ##\n\nA default usage example. For more advanced and possible options please\nsee [here](https://github.com/jas-/node-libnmap/tree/master/examples) or simply\nlook in the included `examples/` folder.\n\n### scan ###\n\nThe example show shows the types of host ranges supported. In this example the\ndefault IANA range of reserved ports is scanned per host in each range (1024).\n\n```javascript\nconst nmap = require('libnmap');\nconst opts = {\n  range: [\n    'scanme.nmap.org',\n    '10.0.2.0/25',\n    '192.168.10.80-120',\n    'fe80::42:acff:fe11:fd4e/64'\n  ]\n};\n\nnmap.scan(opts, function(err, report) {\n  if (err) throw new Error(err);\n\n  for (let item in report) {\n    console.log(JSON.stringify(report[item]));\n  }\n});\n```\n\n### discover ###\n\nThe discover method requires nodejs \u003c `v0.11.2` and can be used to aquire\ninformation about neighbors per network interface.\n\n```javascript\nconst nmap = require('libnmap');\n\nnmap.discover(function(err, report) {\n  if (err) throw new Error(err);\n\n  for (let item in report) {\n    console.log(JSON.stringify(report[item]));\n  }\n});\n```\n\n### sample reports ###\n\nTo see some output examples please take a look at the [json (default) \u0026 xml reports](https://gist.github.com/jas-/23e2a32110562388bef5).\n\n## contributing ##\n\nContributions are welcome \u0026 appreciated. Refer to the [contributing document](https://github.com/jas-/node-libnmap/blob/master/CONTRIBUTING.md)\nto help facilitate pull requests.\n\n## license ##\n\nThis software is licensed under the [MIT License](https://github.com/jas-/node-libnmap/blob/master/LICENSE).\n\nCopyright Jason Gerfen, 2013-2019.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjas-%2Fnode-libnmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjas-%2Fnode-libnmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjas-%2Fnode-libnmap/lists"}