Teen Programmers Unite  


Return to forum top

URL logger

Posted by NULLandVOID [send private reply] at December 08, 2002, 02:26:32 AM

i have noticed while web browsing, that in the lower left hand corner of my Microsoft Internet Explorer browser that sometimes when i go to a new web page, a bunch of cruft flies around down there, URLs that are not like the one i am linking too, now i am infering that these are just file requests from other non-local resources, but i would like to know what they are, but they go to fast.

so my problem is to write a URL logger. i have found some rather...interesting ways of doing this, but all very Michael Jackson...i mean weird=( the prob is IE uses ports in the 4000s to do all its work. now i don't think that i can listen on that load-a-ports without generating error in IE(or my proogie, which ever binds(runs) first). so i came up with the idea of using netstat. i said "well i could, in my code, tell netstat to do all the work of finding the remote connections to port 80(just stick in an infinite loop)", then writing(the remote port 80s) to a temp file, then comparing the new entrys against the old entrys in log(if(oldentrys == NULL){just write}), if the entrys matched another entry in log, discard; goto next; else write into REAL log file.

weird, but it works, but only gives base addresses, host names, not the whole URL. i was wondering how i could do this without needing netstat(and getting the whole host name), i can program in c\c++(wrote the above prog in vc++ 6), perl, java, vb, and asm, but the one that seems like it would work well is java. any suggestions would be nice, i am not sure on how to do this so any istream would help.

thanxs NULLandVOID.

Posted by buzgub [send private reply] at December 08, 2002, 02:45:31 AM

I think the easiest way to do this is to set up a web proxy on your machine, and set it to log all requests.

Posted by mop [send private reply] at December 08, 2002, 12:53:24 PM

or use a packet sniffer, most of them log.

Posted by DragonWolf [send private reply] at December 09, 2002, 07:10:12 AM

ya sniffer is the way to go ^^

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.