Problems? Is your data what you think it is? | |
PerlMonks |
Re: logging internet activity on win32by Dog and Pony (Priest) |
on Sep 03, 2002 at 17:02 UTC ( [id://194814]=note: print w/replies, xml ) | Need Help?? |
You can easily build proxies for your web browser with HTTP::Daemon and LWP::UserAgent, since they both uses HTTP::Request and HTTP::Response. Basically, you get the request from HTTP::Daemon, possibly examines it (Data:Dumper is very useful for details), get the page/whatever by using the request in LWP::UserAgent and return the resulting request (again, possibly after examining) to the browser via HTTP::Daemon.
I wish I had some sample code here, but that is at work. Although it should be easy to figure out from the examples and the docs. Now, I haven't tried this with HTTPS, so I have no idea if it would work. It is also possible you may need to fire up separate proxies for different protocols too, I am not sure offhand and without anything to test with. :) ZoneAlarm should be no problem, you just allow perl to connect to the outside (it even asks for permission, like TPF, right?). If this doesn't cut it, you could go more low-level with IO::Socket::INET. Basically, you have open two sockets, one to communicate with the browser, and one to do the same with the internet. Beware though, that now you will need to grok HTTP to do this. The upside is that you can proxy just about anything, here is a small example of a IMAP proxy that does nothing but pass on the data. I intend to do something with this at some point, but for now it will serve as an example on what you can do - principle should be the same. Is probably lousy code though, is just proof of concept to myself... :)
Maybe, just maybe any of this helps. :) You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue.
In Section
Seekers of Perl Wisdom
|
|