Friday, 15 March 2013

c++ - How can I intercept http requests which an Internet Explorer instance I started performs? -



c++ - How can I intercept http requests which an Internet Explorer instance I started performs? -

my c++ programme launches net explorer (it works ie6 ie10) display web page on internet; have no way modify web page. web page references javascript file (using <script> tag in html markup) - re-create of swfobject javascript library. i'd web page utilize custom re-create of file provide.

i came 2 possible ways tackle this

write proxy server net explorer connects to; proxy fetches actual info , rewrites html own re-create of swfobject referenced. unfortunately quite bit of work, , won't work https. live without back upwards https now.

implement asynchronous protocol plugin net explorer intercepts http requests. know javascript file retrieved using http, intercept accesses swfobject javascript file , yield own file instead. alas, seems impossible well, microsoft back upwards page explains

internet explorer ignores naive attempts overwrite hkey_current_root\protocols\http value other clsid

this sounds hooking 'http' custom protocol handler won't work; in case, approach problematic in case there existing http protocol handler.

is there improve way solve either of these two?

depending on complexity of requirements, fiddler may useful alternative custom proxy since can automatically rewrite both requests , responses , can quick way of scripting want.

it works https, part "free".

want have fiddler automatically rewrite requests , responses, add together or remove headers, or flag/ignore sessions based on rules specify? check out fiddlerscript cookbook

here link cookbook

if need embed it, can embedded fiddlercore.

as @msalters points out below, fiddler's optional ssl interception should consider trade-offs of before using it. it's documented here , i've written short summary of how works in answer.

c++ internet-explorer winapi

No comments:

Post a Comment