@tiaanduplessis/scanports
v1.0.0
Published
Modest port scanner
Downloads
4
Maintainers
Readme
@tiaanduplessis/scanports
Modest port scanner
Table of Contents
Install
This project uses node and npm.
$ npm install @tiaanduplessis/scanports
$ # OR
$ yarn add @tiaanduplessis/scanports
Usage
const scanPorts = require('@tiaanduplessis/scanports')
scanPorts({ host: 'github.com', timeout: 5000 })
.then(data => {
const openPorts = data.filter(current => current.open)
console.log('Open Ports', openPorts)
// Open Ports [ { port: 22,
// open: true,
// data:
// <Buffer 53 53 48 2d 32 2e 30 2d 62 61 62 65 6c 64 2d 37 39 32 63 33 66 34 31 0d 0a> },
// { port: 80, open: true, data: null },
// { port: 443, open: true, data: null } ]
})
.catch(console.error)
Using the CLI:
$ scanports --host=localhost --start=1 --end=1000 --timeout=5000
Contribute
- Fork it and create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
License
MIT