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
Details »»

Version: , by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-23-2001 Last Update: Never Installs: 41
 
No support by the author.

This is a hack that was suggested by paulomt1, all it does is log failed logins and stores them in a table. An admin can then look at the failed logins in the admin panel, searching based on ip, username, password or date. They can also prune the old logs to save space.

You will be required to create a table this can be done via phpmyAdmin or the hack by Firefly which allows you to run queries via the admin panel. You then have to edit member.php to add the query to insert the failed login information and /admin/index.php to add the links to the loginlog.php file.

Updated 25th November 2001 @ 22:15

Added additions suggested by Mike to the file. Instructions on how to upgrade from the pervious version of this hack is included within install.txt, you will need to run 2 sql queries to adjust the table, adjust the line in member.php and upload loginlog.php again to complete the upgrade.

Scott

Show Your Support

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

Comments
  #52  
Old 04-17-2002, 10:46 PM
wooolF[RM]'s Avatar
wooolF[RM] wooolF[RM] is offline
 
Join Date: Jan 2002
Posts: 524
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

][QUOTE]Originally posted by GOD-Dblade
edit
Reply With Quote
  #53  
Old 04-18-2002, 01:16 AM
James5mith James5mith is offline
 
Join Date: Nov 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To everyone who uses this hack:

This is the first time I've done anything like this, so I don't know the proper prodecure.

I have taken PPN's hack, and Axel Foley's modification, and installed them on my boards. Since I am inherently lazy, I wanted quicklinks to all the most common fields you would look at. The stock loginlog.php script only has three options, view all, view recent, and view last 24 hours.

I've modified the code to incorporate some additional features:



To be noted is that as the code stands now, all of my searches are returned by default as atime sorted descending (so that the most recent instances appear first in the list). This is something that can easily be remedied by removing the &direction=DESC modifiers on the quicklinks.

The stock loginlog.php script defines a blank sort field to default to username, I simply changed it to atime.

The search options down at the bottom have been modified from datefailed to atime (for the time sort function) since datefailed wasn't working for me.

I haven't tested the pruning functions, so if anyone would like to, please let me know if I have screwed up anything in the process of doing this.

Again, I would like to thank PPN and Axel for their hard work in getting this hack to not only function, but to be robustly featured as well. Thanks to both of you.

As a final note, Axel: I am thinking about testing inserting yet another one of your hack fields after the cookie login, to try and see if that will work for logging people returning with cookies.
Reply With Quote
  #54  
Old 04-18-2002, 06:32 PM
trainer trainer is offline
 
Join Date: Nov 2001
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by Axel Foley
Hi PPN, first of all, great hack.

I needed a hack to log ALL the logins of my users, failed and successful ones. A few of my users have reported stolen passwords and I couldn't tell them WHEN during the week they logged on, but just the LAST login. So I was looking for a logging hack.

I took yours and I made some modifications:

PHP Code:
      if ($user['password']!=md5($password)) {  // check password

        // HACK: Login Log (Failed login)
        
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
        
$DB_site->query("INSERT INTO loginlog (loginid, ip, username, password, userid, atime, success, reason) VALUES ('','$ipaddress', '$username', '$password', '$user[userid]', '".time()."', '0', 'WRONGPW')");
        
// HACK: Login Log (Failed login)

        
eval("standarderror(\"".gettemplate("error_wrongpassword")."\");");
        exit;
      }
      
$userid=$user[userid];
    } else { 
// invalid username entered

        // HACK: Login Log (Failed login)
        
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
        
$DB_site->query("INSERT INTO loginlog (loginid, ip, username, password, userid, atime, success, reason) VALUES ('','$ipaddress', '$username', '$password', '$user[userid]', '".time()."', '0', 'WRONGUSER')");
        
// HACK: Login Log (Failed login)

        
eval("standarderror(\"".gettemplate("error_wrongusername")."\");");
        exit;
    }

    
// HACK: Login Log (Successful login)
    
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
    
$DB_site->query("INSERT INTO loginlog (loginid, ip, username, password, userid, atime, success, reason) VALUES ('','$ipaddress', '$username', '$password', '$user[userid]', '".time()."', '1', 'LOGINOK')");
    
// HACK: Login Log (Successful login) 
In this way I can log TWO TYPES of FAILED LOGINS, and all the successful logins too. I added two fields to the database.

It works, now I only have to modify your control panel for the hack to query all the fields etc.

The only thing that I don't like is that if users have set automatic login via cookies their successful logins aren't logged (haven't tried with unsuccessful logins via cookie). So I was thinking about DISABLING automatic login via cookies, just to have complete control over the logins. We have had a supermoderator whose pw was stolen by an admin of a 2.0.3 vB forum. I'm very angry so I want to extend the logging features of vB in order to prevent this from happening.

I hope you like these ideas, you could also make it an option WHAT TO LOG (failure, successful and both).

Could you also give me a hint on the BEST way to disable the automatic login via cookie for ALL my users, prevent them from changing that option and to delete the cookie?

Thanks man, you've made a great job and if you make these modifications your hack will be GREAT. Like an OS event logging system.
Reply With Quote
  #55  
Old 04-19-2002, 09:43 PM
James5mith James5mith is offline
 
Join Date: Nov 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by trainer


how do i add this? what do i have to change in the database?
Reply With Quote
  #56  
Old 04-19-2002, 11:00 PM
chazman chazman is offline
 
Join Date: Mar 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Those instructions for adding the fields will work in MyPHPAdmin but they won't work of course if you wanted to add the fields via a MYSQL Query. I tried figuring out what the query command would be and couldn't figure it out. Probably an insert into command though.

To give credit where credit is due. This has become a great hack with the added modifications. The passwords are right out in the open now with this hack. Despite 2.2.5's encryption. This is because we are looking at what is entered as a password and logging it regardless the success of the login or not.

Needed addition is still the cookie logon modification. Once that is done you can pretty much build a query to find anything out about the logon sequence.

If anyone can post that mod I would appreciate it.

Chazman

Attched are the modifications by Axel, and James .. Thanks PPN
Reply With Quote
  #57  
Old 04-20-2002, 08:46 PM
wooolF[RM]'s Avatar
wooolF[RM] wooolF[RM] is offline
 
Join Date: Jan 2002
Posts: 524
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

]( https://vborg.vbsupport.ru/showthrea...604#post241604 ) = (my problem, this thread, post 44)
Reply With Quote
  #58  
Old 04-21-2002, 07:33 PM
Ayame's Avatar
Ayame Ayame is offline
 
Join Date: Apr 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, I feel mightily clueless at the moment. I followed the instructions in the zip to a T (several times, actually) and I keep coming up with a blank screen when I click either option under Failed Logins.

I'm running vb 2.2.5 with the .php3 extensions. (The extension doesn't matter, does it?)

Help would be much appreciated.
Reply With Quote
  #59  
Old 04-22-2002, 01:19 PM
chazman chazman is offline
 
Join Date: Mar 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually I think it matters a great deal. PHP3 and PHP (4) don't mix. These pages and links were written in PHP4

Chazman

You might get them to work with some manual mods though. You would have to start by replacing every php with a php3. I am just guessing. I didn't write these so I couldn't tell you for sure.
Reply With Quote
  #60  
Old 04-22-2002, 03:52 PM
James5mith James5mith is offline
 
Join Date: Nov 2001
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by chazman

Needed addition is still the cookie logon modification. Once that is done you can pretty much build a query to find anything out about the logon sequence.

Chazman
Reply With Quote
  #61  
Old 04-23-2002, 04:59 PM
chazman chazman is offline
 
Join Date: Mar 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my last 24 hour login query from the quicklink is not working correctly. There might be something wrong with that quicklink in James' Mod.

Anyone else notice this.

Anyone else using this?

chazman
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 04:57 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05727 seconds
  • Memory Usage 2,322KB
  • 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
  • (1)bbcode_php
  • (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