[ubuntu-in] Monitoring websites accessed from a computer

Kingsly John member+ubuntu at kingsly.net
Mon Nov 22 09:40:44 GMT 2010


+++ Rajat Khanduja [2010-11-21 19:39:27]:

> I am interested in developing a tool (for personal use) to monitor all the
> websites accessed from the computer. I plan to make use of BASH, but I'm not
> clear how I can know which website has been accessed using scripts. 

Bash isn't exactly the tool for what you want to do.

> I understand that since eventually all browsers are also making use of the
> same port, it must be possible to make use of scripts to log the data
> transfered.  Could anyone guide me on how this could be done. Or is there
> any C/C++ library which could serve similar purpose, i.e. read the
> information travelling through a port.

That's not how sockets work and sites like facebook and google are hundreds
of servers there's no way you'll know which socket is to facebook or to
google.

> I do understand that there are many existing tools to do what I plan to
> achieve, but as I'm a student, I'd like to learn through this experience
> and hence would be grateful if someone could guide me how something simple
> of the above form can be obtained. I don't plan/intend to make any GUI or
> security with that tool, but a simple tool that could help me log my
> activity. I could then use some other tools to analyse the log file for my
> own purpose. 

The only reliably way to log traffic is to intercept all of it. You can do it
with a (transparent) proxy which will ensure that only relevant traffic is
intercepted or you can use something like pcap and capture all traffic on your
system and start searching for your needles in the haystack.

> <Frankly its an attempt to create some tool to restrict amount of time
> spent on websites like Facebook> 

There are firefox extensions that do it for you, you can probably re-write
one from scratch yourself.

And disregard the other mail about looking in the system log. The system
doesn't monitor/log everything that you do.

Kingsly
-- 
---------------------------------------------------------------------------
     Kingsly At Users Dot SourceForge Dot Net  -- http://kingsly.org/
---------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/ubuntu-in/attachments/20101122/74ba11e6/attachment-0001.pgp 


More information about the ubuntu-in mailing list