thanks for reply mate!
it made a few things clearer although i
got a few more questions.

Brian Candler wrote:
> require 'socket'
> host = 'vortex.labs.pulltheplug.org'
> port = 5842
> 
> s = TCPSocket.new(host, port)
> buff = s.read(16).unpack("I*")
> sum = buff[0] + buff[1] + buff[2] + buff[3]
> svar = [sum & 0xffffffff].pack("I")

Why do u have to use sum & 0xffffffff? an error occour
(`pack': bignum too big to convert into `unsigned long' (RangeError)
from vortex0.rb:16) if i DONT use 0xfffffffff while use s.gets
but why do they conflict with each other?

> s.write(svar)
> passwd = s.read(128)
> puts "passordet er #{passwd}"
> s.close
> puts "Koplet fra #{host}"

again, thanks for helping me out with this great answer!
-terje
-- 
Posted via http://www.ruby-forum.com/.