OSX has a command line port scanner. It’s just super sekrit is all. The questionably named stroke command, is part of Network Utility, which is nestled in your Utilities folder. Normally it’s only exposed through Network Utility’s GUI, but there is a way to get at it from your command prompt.
First, create a link to stroke, preferably somewhere in your $PATH.
ian@mymac:~$ ln /Applications/Utilities/Network\ Utility.app/Contents/Resources/stroke stroke
Next make it executable, if it isn’t already.
ian@mymac:~$ chmod uo+x stroke
Now let’s do a port scan. We will scan the localhost, ports 49152 thru 65535.
ian@mymac:~$ ./stroke 127.0.0.1 49152 65535
Can you install nmap, or even nessus instead? Absolutely. But in an, ehrm, pinch — stroke will do nicely.
Technorati Tags: command line, howto, macintosh, microsoft, osx, port scan, security

November 17th, 2007 at 1:53 pm
Thanks for this tips. This is very useful for me. Thanks