On Thu, 2005-05-19 at 15:13 +0900, Nicholas Wieland wrote:
> Hi *,
> I'm trying to SYN scan a pair of machines on my network - actually
> everything is a little more complex than a simple scan, I'm
> simplificating things - and would like to do it with Ruby.
> I was asking myself if I can do that without using nmap, maybe with
> Socket or SocketBase, and how.
> I'd love a simple example, but maybe i'm asking too much :-)
> A pointer to web resources, ruby packages, "use the source Luke" are
> equally appreciated (I already looked at pscan but it does a simple TCP
> connect).

Have look at:

http://raa.ruby-lang.org/project/icmpmodule/

It is an implementation of icmp in pure Ruby using raw sockets. It works
very well and is portable. Similarly, I wrote some code to do ARP
resolution in Ruby. So SYN scan should be doable.

Hope it helps,
Guillaume.