Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Trace and log user actions... Details »»
Trace and log user actions...
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-27-2003 Last Update: Never Installs: 43
 
No support by the author.

This hack was requested by ossi69 and John Mac.

This is a pretty simple hack that allows you to track and document a user's
actions while they are logged into your board. Every click made by the user
makes a brand new entry in a log file. The log file entries include, username,
IP address, date and time, and the URL clicked on. The user actions are
documented even before the user has a chance to see the page he clicked on.

Templates affected by this hack: none
Tables affected by this hack: user
Files affected by this hack: global.php, admin/user.php

Execute the following query to create a new field in the user table:

alter table user add trace smallint(5) unsigned DEFAULT 0 NOT NULL;

You also need to create a brand new directory in your forums directory by
the name of tracelog. You need to make sure that your give the appropriate\
read/write permissions to this directory so that the http server on your
host can create files in there.

Here is a sample output:
Code:
Zed, 192.168.1.101 , 2003-04-28 18:31:30, /forums/index.php
Zed, 192.168.1.101 , 2003-04-28 18:31:36, /forums/forumdisplay.php?forumid=9
Zed, 192.168.1.101 , 2003-04-28 18:31:42, /forums/showthread.php?threadid=143901
Zed, 192.168.1.101 , 2003-04-28 18:31:51, /forums/rules.php
Zed, 192.168.1.101 , 2003-04-28 18:31:53, /forums/forumdisplay.php?forumid=9
Zed, 192.168.1.101 , 2003-04-28 18:32:07, /forums/showthread.php?threadid=143901
Zed, 192.168.1.101 , 2003-04-28 18:32:11, /forums/index.php
Zed, 192.168.1.101 , 2003-04-28 18:32:15, /forums/forumdisplay.php?forumid=103
Zed, 192.168.1.101 , 2003-04-28 18:32:28, /forums/showthread.php?threadid=225576
Zed, 192.168.1.101 , 2003-04-28 18:32:38, /forums/member.php?action=getinfo&userid=4112
Note:Go to this post to download the directory protection file for this hack.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 06-03-2003, 12:41 PM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible (I am almost positive it is) to track individual users selected by admins? I ask this because currently WEForums has 23,000+ members so it isn't exactly something I'd want to install. Additionally, hundreds sign up per day.

So how hard would it be?
Reply With Quote
  #53  
Old 06-03-2003, 01:16 PM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WEForums - by default nobody is traced. You select the users you want to trace in the AdminCP.
Reply With Quote
  #54  
Old 06-04-2003, 12:17 AM
cYbercOsmOnauT's Avatar
cYbercOsmOnauT cYbercOsmOnauT is offline
 
Join Date: May 2003
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one!
/me clicks on install.

Sad that there is no function to show the logs via ACP. Anyways nice security hack!
Reply With Quote
  #55  
Old 06-04-2003, 06:16 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Intex.

I have installed this now...and while everything works...there is one exception. Once I clicked the "Show all traced users" log, I get ALL usernames who have registered. Sure, may not be a problem, you think...but considering it just froze up my PC because it was loading 23,100+ names...I don't think it's very good.

Showing records 1 to 23169 of 23169. Click username to view forum profile.

Strange though...anyone else having this problem? I don't think I did anything wrong, but I will check again...
Reply With Quote
  #56  
Old 06-04-2003, 07:02 AM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm personally not experiencing that particular problem, but then again I've got nowhere near that many members .
Reply With Quote
  #57  
Old 06-04-2003, 07:10 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope. Followed instructions perfectly.

Perhaps it is to do with the miserable hack or the country hack. I noticed in the DB query part there is two hacks there. Perhaps those are it?
Reply With Quote
  #58  
Old 06-04-2003, 07:38 AM
Intex Intex is offline
 
Join Date: Apr 2002
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ZZed - is there any way you can include guests in the trace logs? The reason I ask is because I want to keep an eye on actions taken by people who aren't registered yet.
Reply With Quote
  #59  
Old 06-04-2003, 08:35 AM
WEForums WEForums is offline
 
Join Date: Apr 2003
Location: Jacksonville, Florida
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I fixed my problem.

I was tampering with the code and this seems to work. (Although not sure about the userid = part. Guess it stays blank...)

Code:
if($bbuserinfo['usergroupid']==1) {
  if ($handle = fopen("tracelog/Guest.log", 'a')) {
    $location=$DB_site->query_first("select location from session where userid = $bbuserinfo[userid] order by lastactivity 

desc limit 1;");

    $ztime = strftime("%Y-%m-%d %H:%M:%S", time());
    $data = sprintf("%s, %-15s, %-19s, %s\n", Guest, $REMOTE_ADDR, $ztime, $location[location]);
    fwrite($handle, $data);
    fclose($handle);
  }
}
Put that above

Code:
if($bbuserinfo[trace] == 1) {
I am going to assume tracking an entire group would be just like the above, right? Then just replace Guest with whatever name... Perhaps useful for tracking a group you are nearly going to ban.
Reply With Quote
  #60  
Old 06-28-2003, 12:44 PM
quinte's Avatar
quinte quinte is offline
 
Join Date: Aug 2002
Location: South Africa
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A lovely hack -

ALAS.....
Allthough everything seems to be intact - for one or other reason when editing a user's profile in the adminCP (tick the option to trace) - it will not save.

Clicking on the 'list users who are being traced' likewise indicates that there are none!

Any help on this problem will be appreciated - as it is a very useful hack indeed!

(Using VB 2.2.9)
Reply With Quote
  #61  
Old 06-28-2003, 05:08 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:44 AM quinte said this in Post #59
A lovely hack -

ALAS.....
Allthough everything seems to be intact - for one or other reason when editing a user's profile in the adminCP (tick the option to trace) - it will not save.

Clicking on the 'list users who are being traced' likewise indicates that there are none!

Any help on this problem will be appreciated - as it is a very useful hack indeed!

(Using VB 2.2.9)
check your PM's.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04437 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete