A Multi Thread TCP Port Scaner
npm i tcp-port-scaner -g
portscan --target 127.0.0.1 --ports 80
portscan --target 192.168.1.1 192.168.1.2 --ports 80
portscan --target 192.168.1.1-192.168.1.254 --ports 80
portscan --target 192.168.1.1/24 --ports 80
portscan -f iplist.list --ports 80
portscan --target 127.0.0.1 --ports 80 81 2000-3000
portscan -h
const Scaner = require('tcp-port-scaner')
const scaner = new Scaner()
scaner.init({
targets: ['192.168.1.1/24', '192.168.2.1-192.168.2.254'],
ports: [80, 81, '1000-2000'],
thread: 100,
timeout: 5000,
callback({ host, port, open }) {
if (open) {
console.log(`${host}:${port} is open`)
}
},
})
scaner.run()