Instrumented web proxy

Miki miki.tebeka at gmail.com
Thu Mar 27 17:07:15 EDT 2008


Hello Andrew,

> Tiny HTTP Proxy in Python looks promising as it's nominally simple (not
> many lines of code)
>
> http://www.okisoft.co.jp/esc/python/proxy/
>
> It does what it's supposed to, but I'm a bit at a loss as where to
> intercept the traffic. I suspect it should be quite straightforward, but
> I'm finding the code a bit opaque.
>
> Any suggestions?
>From a quick look at the code, you need to either hook to do_GET where
you have the URL (see the urlunparse line).
If you want the actual content of the page, you'll need to hook to
_read_write (data = i.recv(8192)).

HTH,
--
Miki <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com




More information about the Python-list mailing list