Hey People.
How are you all doing on this Friday?
Read from the Stipple line at the bottom
if you dont want to read about my situation.
I was told to install a proxy server, and monitor users spending the whole day on the Internet (At work)
So i installed Smoothgardian, it has built in reports but , its not something you can use.
SmoothGardian uses Squid as a proxy server. and logs all data to a access.log file.
Ive been battling for months now to get a proper tool to report off the log file. I eventually found a half decent tool called Sawmill, but even that cant do what i want, So i eventually, started creating my own solution to my problem.
I used PSFTP.exe to download the file then used Plink.exe to execute a command on the linux server to rotate the logs.
I then wrote(VB )a utility that takes the Access.log file and converts it to a CSV file it also trimms each URL to the 3rd "/"
i then use a DTS MS SQL package to upload it into a Sql2000 database using
DTSRUN scheduled every 30mins, then use crystal reports to create my own report, This all works
fine, actually it works great.
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
But the problem is when squid logs the requested url it logs the IP address
of the user aswell, We run DHCP and i think ip addresses expires every week
or 12 hours cant remember but it expires anyway.
I would like someone to show me how to get the hostname of an ip address
i'm sure getting an ip is easier, and i assume you have to query the DNS
server.
Will i be able to use Winsock, the DNS resolution protocoll is it UDP or TCP
I searched all over google but cant find anything?.
Once this is done my task is complete, then i dont have to stress on getting reports for management.
DNS Resolve IP to Hostname?
Well how would that help me?Anthropoid wrote:Is there a similar command to ipcofig /flushdns in Linux ?
Commands can be dumped to file using ">C:\Dump.txt" so instead of it printing to screen it prints to file.
As far as i know that justs flushes the DNS cache, i could use that to posibly
make sure the IP address linked to hostname is accurate.
I would probably need a list of ip address asigned to hostnames in a file and use that as a mapping table. it would help more if i could
resolve the IP to hostanme then instead of saving the IP
in my CSV file , save the hostaname.
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
<teh goggles!>
Developer Fusion
using vb.net, i'm almost convinced there's a class which handles this far more swimmingly...
Developer Fusion
using vb.net, i'm almost convinced there's a class which handles this far more swimmingly...
Most people would sooner die than think; in fact, they do so - Bertrand Russel
One of the girls posted this, sorry cannot remember who?
May be of help?
http://www.vbip.com/winsock-api/gethost ... ame-01.asp
May be of help?
http://www.vbip.com/winsock-api/gethost ... ame-01.asp
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
<submits complicated bill for a year's supply of cheese sticks and biltong twigs...>
hey, the way i see it, you're a charity case... anyone using vb sould be treated like that wierd homeless guy that lives under my stairs and keeps asking me to help him get rid of something called a "snozzle".. only a pleasure bud...
hey, the way i see it, you're a charity case... anyone using vb sould be treated like that wierd homeless guy that lives under my stairs and keeps asking me to help him get rid of something called a "snozzle".. only a pleasure bud...
Most people would sooner die than think; in fact, they do so - Bertrand Russel