HTTP Debugging Proxy

F

Fuzzyman

Xavier Defrang has written an HTTP Debugging Proxy.
This message is basically for him - since he says on his website that
he inhabits this newsgroup.

I downloaded this and ran it , with the following result :Traceback (most recent call last):
File "D:\Python Projects\cgiproxy\http_debugging_proxy.py", line 34,
in ?
signal.signal(signal.SIGALRM, SIGALRM_handler)
AttributeError: 'module' object has no attribute 'SIGALRM'

Is this my fault or yours ? :)
I am in a restricted internet environment and have to use an external
CGI proxy to get unrestricted access. I would like to write a little
server that will run on my machine (client) and transparently modify
standard http requests to go via the CGI proxy....

My knowledge of http and tcp/ip protocols is little but growing... so
this should be an interesting exercise - if I can get it off the
ground at all.

My other problem is that my restricted internet access is already via
proxy - so I need to get the server to use that proxy and my browser
via my little serevr..... *sigh* (so merely changing the settings in
IE isn't enough - because then urllib2 and it's ilk won't correctly
pick up the squid proxy settings to make valid conenctions).

Regards,

Fuzzy

http://www.voidpsace.org.uk/atlantibots/pythonutils.html
 
A

Alan Kennedy

[Fuzzyman]
Xavier Defrang has written an HTTP Debugging Proxy.
This message is basically for him - since he says on his website that
he inhabits this newsgroup.

I downloaded this and ran it , with the following result :

Traceback (most recent call last):
File "D:\Python Projects\cgiproxy\http_debugging_proxy.py", line 34,
in ?
signal.signal(signal.SIGALRM, SIGALRM_handler)
AttributeError: 'module' object has no attribute 'SIGALRM'

Is this my fault or yours ? :)

Yours, for trying to use Unix-only facilities on Windows :)

The documentation page for the signal module is not very clear about
this point, probably because there are plenty of exclusions on
different platforms, and documenting them all explicitly would
over-complicate the documentation.

There is a hint on the docs for the signal.alarm() function, which
says "Availability: Unix". IIRC, the code signal.alarm(func) is just a
wrapper around the code signal.signal(signal.SIGALRM, func).

http://docs.python.org/lib/module-signal.html

Perhaps the platform independent "Timer" object can give you what you
need?

http://docs.python.org/lib/timer-objects.html

regards,
 
K

Kevin Dahlhausen

Yours, for trying to use Unix-only facilities on Windows :)


There is a proxy called 'TCPWatch' written in python that works under
windows and is useful for debugging.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,037
Latest member
MozzGuardBugs

Latest Threads

Top