yes thanks but I don't wanna use nmap ;) I want to write it by my own...

the only problem I have is: "You send a SYN packet, as if you are going 
to open a real connection and then wait for a response[..]" but how can 
I send a SYN packet with ruby? I also know how to use telnet and sockets 
and how I could simply connect with tcp to a certain port but how can I 
send such a SYN packet ?!?

Is this at all possible with ruby or is this too low level?

greets