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
  #62  
Old 04-24-2002, 02:58 AM
Dixiemill Dixiemill is offline
 
Join Date: Apr 2002
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to keep my database lean... I want to clear the failed attempts when the login is successful.. I keep getting "parse errors" any help here would be hot.

I've modified Axel Foley's code for successful logins to:

// HACK: Login Log (Successful login)
$DB_site->query("DELETE FROM loginlog WHERE userid='$user[userid]'");
// HACK: Login Log (Successful login)

Thanks in advance for the help.
[edit]: corrected spelling mistakes
[edit]: :ermm: I was missing the "$" in "$DB_site". Problem solved.
Reply With Quote
  #63  
Old 07-18-2002, 11:38 AM
veedee veedee is offline
 
Join Date: Oct 2001
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm runing 2.2.4, would this still work?
Reply With Quote
  #64  
Old 07-22-2002, 04:33 PM
musicfreak12399's Avatar
musicfreak12399 musicfreak12399 is offline
 
Join Date: Mar 2002
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack.. Just installed on 2.2.6 and works great. Very easy to install... great instructions

Good hack!

Thanks
Reply With Quote
  #65  
Old 07-22-2002, 05:38 PM
veedee veedee is offline
 
Join Date: Oct 2001
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works on 2.2.6 indeedy
Reply With Quote
  #66  
Old 07-22-2002, 11:05 PM
ModshackUK ModshackUK is offline
 
Join Date: Jun 2002
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parse error: parse error in /home/www/shack/html/forums/member.php on line 110

I keep getting this error when I try to log out of my forums.

Any ideas why

Running php4 vB2.2.6

HM
Reply With Quote
  #67  
Old 07-29-2002, 04:20 AM
Night Owl Night Owl is offline
 
Join Date: May 2002
Location: Oklahoma
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting that error too.
Reply With Quote
  #68  
Old 09-05-2002, 08:10 AM
dwh's Avatar
dwh dwh is offline
 
Join Date: Feb 2002
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by PPN
that would be my bad

$DB_site->query("INSERT INTO loginlog (loginid, ip, username, password, userid, atime) VALUES ('','$ipaddress', '$username', '$password', '$user[userid]', '".time()."')");

should be

$DB_site->query("INSERT INTO loginlog (loginid, ip, username, password, userid, atime) VALUES ('','$ipaddress', '".addslashes($username)."', '$password', '$user[userid]', '".time()."')");
Reply With Quote
  #69  
Old 10-07-2002, 10:39 PM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops! (spoke too fast!)

"Houston, we have a problem!"

Getting parse errors by the second ...

I pasted this into the member.php:

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)
        
eval("standarderror("".gettemplate("error_wrongpassword")."");");
        exit;
      } 
Now getting parse errors on LINE#135 in member.php after loggin out AND checking a members profile:

PHP Code:
    // 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)
        
eval("standarderror("".gettemplate("error_wrongpassword")."");");
        exit;
      }
      
$userid=$user[userid];
    } else { 
// invalid username entered
      
eval("standarderror("".gettemplate("error_wrongusername")."");");
      exit;
    }

    if (
$user['cookieuser']==1) {
      
vbsetcookie("bbuserid",$user['userid']);
      
vbsetcookie("bbpassword",$user['password']);
    }

    
$DB_site->query("DELETE FROM session WHERE sessionhash='".addslashes($session[dbsessionhash])."'");

    
$session['sessionhash']=md5(uniqid(microtime()));
    
$session['dbsessionhash']=$session['sessionhash'];
    
$DB_site->query("INSERT INTO session (sessionhash,userid,host,useragent,lastactivity,styleid) VALUES ('".addslashes($session['sessionhash'])."','".intval($userid)."','".addslashes($session['host'])."','".addslashes($session['useragent'])."','".time()."','$session[styleid]')");
    
vbsetcookie("sessionhash",$session['sessionhash'],0);
    
$username $user['username'];
   } 
<--- Line# 135 is End Bracket ABOVE


Anyone know why?
Reply With Quote
  #70  
Old 10-08-2002, 12:54 AM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by ModshackUK
Parse error: parse error in /home/www/shack/html/forums/member.php on line 110

I keep getting this error when I try to log out of my forums.

Any ideas why

Running php4 vB2.2.6

HM
Reply With Quote
  #71  
Old 12-05-2002, 12:12 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just a quick note: The hack works flawlessly in 2.2.9..

Very useful expecially for boards with paid membership..

Thx for sharing..
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 05:37 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.04982 seconds
  • Memory Usage 2,344KB
  • 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
  • (2)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