[ale] lightweight testing for remote services
Cory T. Echols
ctechols at mindspring.com
Fri Mar 21 09:15:52 EST 2003
On 03/21, Keith Hopkins wrote:
> Anyone know a lightweight way to test if a service
> (dns,http,ssh,insert-your-favorite-protocol-here) is being serviced on
> a remote server?
<Example using nmap snipped>
You could use netcat (nc) with the -z flag. I'm not an experienced
benchmarker by any means, by my own rudimentary testing shows it to be a
decent amount lighter than an nmap invocation.
Here's an example checking for an open ssh port on my machine.
{1:~}$ time nmap -p 22 localhost
Starting nmap V. 3.10ALPHA4 ( www.insecure.org/nmap/ )
Interesting ports on localhost (127.0.0.1):
Port State Service
22/tcp open ssh
Nmap run completed -- 1 IP address (1 host up) scanned in 0.380 seconds
nmap -p 22 localhost 0.12s user 0.08s system 46% cpu 0.431 total
{2:~}$ time nc -v -z localhost 22
localhost [127.0.0.1] 22 (ssh) open
nc -v -z localhost 22 0.00s user 0.00s system 0% cpu 0.003 total
--
Cory T. Echols | "The contest, for ages, has been to rescue liberty
ctechols at mindspring.com | from the grasp of executive power."
| --Daniel Webster
|
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list