Advertisement
Guest User

Untitled

a guest
Feb 18th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.61 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#Gets everything from client
  18.                         socks.puts info#sends it to server
  19.                     end
  20.                  end
  21.               end
  22.            end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement