Skip to content
small-ish script for scanning local ips for open http servers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
example.js
index.js
interface.js
package.json

README.md

ip-scanner

small-ish script for scanning local ips for open http servers

Example

Calling ipScan can make calls at once, when they have all completed it will call the next range of IPs. The ipScan function only generates the last 2 positions of the an IP address with the default options; basically http://xxx.xxx.{range1}.{range2}:{ports} but you can supply your own template string.

Below are the default values that would be provided if you call ipScan without any arguments

var ipScan = require("ip-scanner");
ipScan({
    range1: [0, 10], // the next to last chunk of an ip address
    range2: [0, 10], // the last chunk of an ip address
    poolSize: 5, // how many requests to make at a time
    ports: [80], // ports to look at for each generated ip
    timeout: 2000, // request timeout duration
    urlTemplate: "http://192.168.%s.%s" //customize how the 2 ranges will be used in the url.
});
You can’t perform that action at this time.