Hi!
Ive been trying for a couple of days to get connected to vortex wargame
with the help of ruby. Since this language is kinda new to me i dont get
what im doing wrong.
The mission is to get 4 unsigned integer, sum them together and send
the answer to server, but the output i get is:
639805687
passordet er îYYÙe{g6ûbzzzt, wrong
Koplet fra vortex.labs.pulltheplug.org
Exit code: 0
Okey, i get the wrong code but why the chars just before?
require ‘socket’
host = ‘vortex.labs.pulltheplug.org’
port = 5842
s = TCPSocket.new(host, port)
buff = s.recvfrom(16)[0].chomp.unpack(“I*”)
sum = buff[0].to_i + buff[1].to_i + buff[2].to_i + buff[3].to_i
svar = [sum].pack(“I”)
s.puts (svar)
passwd = s.recvfrom(128)
puts “passordet er #{passwd}”
s.close
puts “Koplet fra #{host}”