0

I'm making content filtering proxy server using WEBrick.

Can I change/filter the content of ssl-encrypted page?

Thanks.

here is my code;

#!/usr/bin/env ruby

require "webrick"
require "webrick/httpproxy"
require "ruby-debug"

include WEBrick

handler = Proc.new do |req, res|
  # res.body is empty when connecting https
  # I wanna chagne the body...
end

server = HTTPProxyServer.new(
  :Port => 4545,
  :ProxyVia => false,
  :ProxyContentHandler => handler,
)

Signal.trap('INT') do
  server.shutdown
end

server.start
mitsuki
  • 21
  • 2

1 Answers1

0

You have to Man-In-The-Middle attack.

WEBrick::HTTPProxyServer does not support MITM natively but you can find some third party MITM proxy implementations based on WEBrick.

  • Thank you for you response. I ve heard the name of MITM attack, I ll try it. Can you give me some URLs? – mitsuki Jul 06 '12 at 05:28