mirror of
https://github.com/xnite/MCSeeker.git
synced 2026-05-02 12:54:50 -07:00
bug fixes, final touches
This commit is contained in:
11
README.md
11
README.md
@@ -14,12 +14,19 @@ Run `node ./scanner.js [options] --ip <ip range>`
|
|||||||
### CLI Options
|
### CLI Options
|
||||||
* `--ip <ip>` - IP Address or Range of IP Addresses with CIDR notation (eg- 192.168.1.0/24)
|
* `--ip <ip>` - IP Address or Range of IP Addresses with CIDR notation (eg- 192.168.1.0/24)
|
||||||
* `--port <ports>` - Ports to look for minecraft servers on. (Default: `25565-25566`)
|
* `--port <ports>` - Ports to look for minecraft servers on. (Default: `25565-25566`)
|
||||||
|
* `--min-players <count>` - Minimum number of players.
|
||||||
|
* `--max-players <count>` - Maximum player count.
|
||||||
|
|
||||||
|
#### Output Options
|
||||||
* `--show-desc` - Enable showing of server description in output.
|
* `--show-desc` - Enable showing of server description in output.
|
||||||
* `--quiet` - Silence terminal output.
|
* `--quiet` - Silence terminal output.
|
||||||
* `--min-players <count>` - Minimum number of players to display.
|
|
||||||
* `--max-players <count>` - Only show servers with max player count or below.
|
|
||||||
|
#### Output File Options
|
||||||
* `--out <filename>` - Output to CSV file (Can be opened as a spreadsheet in MS Office, Google Docs, etc.)
|
* `--out <filename>` - Output to CSV file (Can be opened as a spreadsheet in MS Office, Google Docs, etc.)
|
||||||
* `--format <csv|txt|txt-connect-only>` - Output format (`txt-connect-only` for `ip:port` list format)
|
* `--format <csv|txt|txt-connect-only>` - Output format (`txt-connect-only` for `ip:port` list format)
|
||||||
|
* `--log-desc` - Output server discription to output file.
|
||||||
|
|
||||||
#### Geo Location
|
#### Geo Location
|
||||||
* `--geo-ip` - Use IP Geolocation database.
|
* `--geo-ip` - Use IP Geolocation database.
|
||||||
* `--geo-coords` - Add geo-coordinates to output.
|
* `--geo-coords` - Add geo-coordinates to output.
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ scan.on('result', function(data){
|
|||||||
var theText = data.ip + ":" + data.port + "\t" + pingRes.version.name + "\t" + pingRes.players.online + " of " + pingRes.players.max + " players";
|
var theText = data.ip + ":" + data.port + "\t" + pingRes.version.name + "\t" + pingRes.players.online + " of " + pingRes.players.max + " players";
|
||||||
if(process.params['show-desc'])
|
if(process.params['show-desc'])
|
||||||
{
|
{
|
||||||
theText += "\t"+pingRes.description.text;
|
theText += "\t"+pingRes.description.text.replace(/\n/g, ' ');
|
||||||
}
|
}
|
||||||
if (SCAN_OPTS_OUTPUT_CSV)
|
if (SCAN_OPTS_OUTPUT_CSV)
|
||||||
{
|
{
|
||||||
@@ -127,6 +127,9 @@ scan.on('result', function(data){
|
|||||||
{
|
{
|
||||||
case "txt":
|
case "txt":
|
||||||
line = data.ip + ":" + data.port + "\t" + pingRes.version.name.replace(/\,/g, '+');
|
line = data.ip + ":" + data.port + "\t" + pingRes.version.name.replace(/\,/g, '+');
|
||||||
|
if (process.params['log-desc']) {
|
||||||
|
line += "\t" + pingRes.description.text.replace(/\n/g, ' ');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "txt-connect-only":
|
case "txt-connect-only":
|
||||||
line = data.ip + ":" + data.port;
|
line = data.ip + ":" + data.port;
|
||||||
@@ -134,6 +137,9 @@ scan.on('result', function(data){
|
|||||||
case "csv":
|
case "csv":
|
||||||
default:
|
default:
|
||||||
line = data.ip + ":" + data.port + "," + pingRes.version.name.replace(/\,/g, '+') + "," + pingRes.players.online + "/" + pingRes.players.max;
|
line = data.ip + ":" + data.port + "," + pingRes.version.name.replace(/\,/g, '+') + "," + pingRes.players.online + "/" + pingRes.players.max;
|
||||||
|
if (process.params['log-desc']) {
|
||||||
|
line += "," + pingRes.description.text.replace(/\n/g, ' ').replace(/\,/g, ';');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(process.params['geo-ip'])
|
if(process.params['geo-ip'])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user