Enable command-line portscanning

Apr 12, '02 08:09:02AM

Contributed by: wiesbeck

Just found this over at the macnn.com forums (credit to kennethmac2000 for that). There is no real command for doing portscans in the Terminal, so instead of installing nmap, just use the Network Utility from the command line like this:

 % cd /Applications/Utilities/'Network Utility.app'
% sudo cp Contents/Resources/stroke /bin/portscan
% rehash
Now you can do portscans from the command line using the following syntax:
portscan [address] [startPort] [endPort]
[Editor's note: I thought we had published something similar before, but I can't seem to locate it...]

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020412080902228