net.ultrametrics.security
Class PortScanner
java.lang.Object
|
+--net.ultrametrics.security.PortScanner
- public class PortScanner
- extends java.lang.Object
Command-line utility to scan for tcp services on a range of ports on
a host or on a range of hosts.
Usage: PortScanner [OPTIONS] hostname [hostname2]
optional parameters are:
-l port# | --low port# low port number
-h port# | --high port# high port number
-t n | --threadlimit n spawn n threads
-v | --verbose verbose output
Concurrently scans, using at maximum the number of threads specified,
for hosts between 'hostname' and 'hostname2' which are accepting
tcp connections on ports between the low and high ports specified.
If 'hostname2' is not specified, only 'hostname' is probed.
Defaults are ports 1 through 65535 with a thread limit of 1.
i.e. java net.ultrametrics.security.PortScanner 10.0.0.0 10.0.0.255
Connection results are produced on stdout, lots of asynchronous statistics
on stderr.
Note:
If you try to use too many threads to probe a single or small set of
target hosts, you are going to cause NoRouteToHostExceptions or similar
exceptions to occur which will cause the thread to think just that, bail
prematurely and potentially miss active ports.
When a host is unreachable, multiple threads on different port sets
all report this. Try filtering stdout through 'sort -u' for best results.
|
Method Summary |
static void |
main(java.lang.String[] args)
main() |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PortScanner
public PortScanner()
main
public static void main(java.lang.String[] args)
- main()
- See Also:
parseArgs