Advertisement
Guest User

Untitled

a guest
Feb 18th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.56 KB | None | 0 0
  1.  if(whois =~ /CONNECT/)
  2.     Thread.new do
  3.         ircserver = whois.gsub("HTTP/1.0", "").gsub(/\s+/, "").gsub("CONNECT", "")
  4.        irchost, ircport = ircserver.split(":")
  5.         socks = TCPSocket.open(irchost, ircport)
  6.         socks.puts whois
  7.         i = socks.gets
  8.         peer.puts i
  9.             Thread.new do
  10.                 loop do#New loop
  11.                    server = socks.gets#Gets everything from server
  12.                    peer.puts server#Sends it to client
  13.                         end
  14.                end
  15.                   Thread.new do
  16.                      loop do
  17.                         info = peer.gets
  18.                         socks.puts info
  19.                     end
  20.                  end
  21.               end
  22.            end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement