X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=networking%2Fpscan.c;h=0893c3577f5ce37eaaec02ba10d4f933aec489b3;hb=7fdb764e2e12119949cc17046d5ad4a13a9be4c6;hp=a9e5d5c29fecf842be9cfcebfd84850708b9ccd7;hpb=ca18311d0ae16a96e988df15a9009095f93df85e;p=oweals%2Fbusybox.git diff --git a/networking/pscan.c b/networking/pscan.c index a9e5d5c29..0893c3577 100644 --- a/networking/pscan.c +++ b/networking/pscan.c @@ -5,6 +5,26 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config PSCAN +//config: bool "pscan" +//config: default y +//config: help +//config: Simple network port scanner. + +//applet:IF_PSCAN(APPLET(pscan, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_PSCAN) += pscan.o + +//usage:#define pscan_trivial_usage +//usage: "[-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST" +//usage:#define pscan_full_usage "\n\n" +//usage: "Scan a host, print all open ports\n" +//usage: "\n -c Show closed ports too" +//usage: "\n -b Show blocked ports too" +//usage: "\n -p Scan from this port (default 1)" +//usage: "\n -P Scan up to this port (default 1024)" +//usage: "\n -t Timeout (default 5000 ms)" +//usage: "\n -T Minimum rtt (default 5 ms, increase for congested hosts)" #include "libbb.h" @@ -146,7 +166,7 @@ int pscan_main(int argc UNUSED_PARAM, char **argv) } if (ENABLE_FEATURE_CLEAN_UP) free(lsap); - printf("%d closed, %d open, %d timed out (or blocked) ports\n", + printf("%u closed, %u open, %u timed out (or blocked) ports\n", closed_ports, open_ports, nports - (closed_ports + open_ports));