Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/usr/bin/env ruby
  2.  
  3. require 'socket'
  4.  
  5. contenido = "d=example.com:XXX.XXX.XXX.XXX%3Ahttp%3A%2F%2Fexample.com"
  6.  
  7. s = TCPSocket.open("dbc.pinestry.com", 80)
  8. s.puts("POST /rtk/get_url.php HTTP/1.0")
  9. s.puts("Host: dbc.pinestry.com")
  10. s.puts("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3")
  11. s.puts("Accept: */*")
  12. s.puts("Accept-Language: en-us,en;q=0.5")
  13. s.puts("Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7")
  14. s.puts("Content-Length: #{contenido.length}")
  15. s.puts("Content-Type: application/x-www-form-urlencoded")
  16. s.puts("\r\n")
  17. s.puts(contenido)
  18.  
  19. while line = s.gets
  20.   puts line
  21. end
  22.  
  23. s.close