#!/env/ruby #@filename rpsyc.rb #@author Alex "coyo tama" Maurin #Description A simple PSYC connection handler in ruby. require 'socket' puts 'connecting to:' + IPSocket::getaddress('psyced.org') + "\n" puts 'connecting...' host = 'psyced.org' port = 4404 source = 'psyc://coyotama.pwnz.org/~coyotama' context = 'psyc://psyced.org/@welcome' nick = 'coyotama' tag = rand(24) s = TCPSocket.open(host, port) s.puts(".\n") s.puts(".\n") s.puts(":_tag " + (tag += 1).to_s() + "\n") s.puts(":_source " + source + "\n") s.puts(":_nick " + nick + "\n") s.puts(":_target psyc://psyced.org/@welcome\n") s.puts("_request_context_enter\n") s.puts(".\n") sleep(5) s.puts(":_target " + context + "\n") s.puts(":_tag " + (tag += 1).to_s() + "\n") s.puts(":_source " + source + "\n") s.puts(":_nick " + nick + "\n") s.puts(":_focus " + context + "\n") s.puts("_message_public\n") s.puts("sup, mah homies!\n") s.puts(".\n") puts 'it seemingly worked...' while true sleep(5) s.puts(".\n") end