PDA

View Full Version : Admin CP IP Logging w/last seen


Sebastian
15 Dec 2002, 16:55
This hack logs all IP's of visits to the admin CP. It shows the IP of the user, when was the last visit the person made, how many times the person visited, along with the date.

This is great if you want to be informed of any intruders ;)

File with IP/Date will be stored by default to forum/admin/logs/iplog.inc

TODO:
1. add logging of username if registered based on stored cookie
2. code cleaning.

Please Click HERE (http://www.vbulletin.org/forum/misc.php?s=&action=install&threadid=46695) if you installed, thanks!

Screenshot next post.

Cheers :bunny:

Sebastian
15 Dec 2002, 16:59
screenshot.

flup
15 Dec 2002, 17:03
Nice

Chris M
15 Dec 2002, 17:59
Cool:)

Satan

assassingod
15 Dec 2002, 18:02
Very cool. Will use, thanks

LOD-squa
15 Dec 2002, 18:02
Cool, nice work ;)

djr
15 Dec 2002, 23:54
Nice hack! Thanks.

It didn't show my IP the first time I logged into AdminCP though. The 2nd time it got properly displayed. It did store it the logfile though (the 1st time that is)

- djr

Sebastian
16 Dec 2002, 00:04
yes, i noticed that .. it will log it even the first time like you say, but will not show it.. weird, i'll check that out.

the good thing that i forgot to mention is if you visit the cp 100 times it will not make a new line in the log file, so you won't end up with a 50MB log file ;)

it will update the current line IF the IP is the same. it will just update the number of visits and the date/time.

matthepepe
16 Dec 2002, 01:17
it doesnt seem to be working for me, it displays the ip correctly but doesnt seem to write to the fiel, the folder is chmod to 777.

Sebastian
16 Dec 2002, 01:56
Originally posted by matthepepe
it doesnt seem to be working for me, it displays the ip correctly but doesnt seem to write to the fiel, the folder is chmod to 777.
is it making the file just not writing to it? or is it not making the file at all? did you change the default path admin/logs ?

a43079
16 Dec 2002, 23:44
very mice hack

matthepepe
17 Dec 2002, 02:07
nevermind i got it to work thanks.
good idea by the way.
Originally posted by Sebastian

is it making the file just not writing to it? or is it not making the file at all? did you change the default path admin/logs ?

Cyberhouse
17 Dec 2002, 05:31
Nice hack.

Installed ;)

Smoothie
17 Dec 2002, 09:26
Installed. Good one.

Exo
17 Dec 2002, 11:18
nice, how can i make it to the german date format?

Sebastian
18 Dec 2002, 02:15
Originally posted by Exo
nice, how can i make it to the german date format?

explain how german date looks like.

Exo
18 Dec 2002, 09:25
am 18.12.2002 um 20:23:11

or

am 18. Dezember, 2002 um 20:23:11

Talisman
27 Dec 2002, 20:58
This hack is way cool, Sebastian. Thanks.

I really like showing anyone who stumbles over to our Admin CP login page (in big red letters) that we're keeping track of people who access this area and that their IP addresses are being logged.

Maybe later, we (meaning someone out there, of course, since I'm still such a dunce at this stuff) might like to expand this to let us view the log from a link in the Admin CP. Think I might attempt that, myself, unless someone else already has done so and would like to post that here.

Nice hack. Thanks, again.

Sebastian
28 Dec 2002, 00:55
Originally posted by Talisman

Maybe later, we (meaning someone out there, of course, since I'm still such a dunce at this stuff) might like to expand this to let us view the log from a link in the Admin CP. Think I might attempt that, myself, unless someone else already has done so and would like to post that here.


Open admin/index.php

find:


// ***
makenavoption("Statistics","stats.php?action=index","<br>");
makenavoption("Admin Log","adminlog.php?action=choose");
makenavselect("Statistics & Logs","<hr>",$df);

Replace with:

// ***
makenavoption("Statistics","stats.php?action=index","<br>");
makenavoption("Admin Log","adminlog.php?action=choose","<br>");
makenavoption("Admin CP iplogs","vblogs.php?");
makenavselect("Statistics & Logs","<hr>",$df);


Upload the attached php file to forums/admin

if you haven't changed any of the path logs then your set to go, otherwise open vblogs.php and change the include path to the location of your iplogs.inc

save, upload all files, you should see a link under Statistics & Logs to view the logs from admin cp.

Zaeolos
10 Jan 2003, 13:30
***Installed***

Works Perfectly with 2.2.9, but I was wondering. Is there a way to make it start a new line with every new IP address. When you view it in the Admin CP, it just keeps adding back to back. It would be easier to sort out if each IP started a new line.

Thanks.

esfron
06 Feb 2003, 03:07
Thanks

wooolF[RM]
06 Feb 2003, 12:03
nice one ;)

/me clicks install

LightBringer
18 Feb 2003, 00:21
AWESOME hack, love it! Only thing I would ask above it all would be to have the vblogs.php have a nicer interface.. if I knew php I would do it, but I do not - thanks again for the great hack anywho ;)

Boofo
03 Apr 2003, 12:37
Sebastian, is there a way to have it list the contents of the inc file a little cleaner and easier to read? Right now, it just displays everything on the same line until the page word wraps.

subu1
05 May 2003, 13:19
thxx;)

Haruka
09 Jan 2005, 19:16
Hi all :)
This hack is cool ;) I've install it but I need a similiar one for users...
I've a lot of prob with an user and I must log all his moves...
Can anyone link me some utilities?
Thanks :)