MOD Name: Bad Login Manager
Version: 2
Author: Ian Unruh
e-mail: ianunruh@gmail.com
web: http://www.cgeagles.com

Updated by: Tim Srensen/ HaCk3r
e-mail: timsorensen@gmail.com
web: http://www.wizzdev.dk

Php-fusion: v7.00
---------------------------------

DESCRIPTION:
------------

Some one un-authorized attempting to access your site?
This MOD will display all incorrectly entered login attempts.
Automatically blacklists IP address's after 10 failed login attempts.
Searches for users IP's and for member names.
You can see if a member has forgotten their details. (False Alarm)
Simple Installation - Requires simple copy and paste to one file, and then the infusion procedure.

INSTALLATION:
-------------

1. Upload the folder "bad_login" and it's contents to the "infusions" folder of your PHP Fusion installation

2. If your PHP-Fusion version matches a folder in the /mod/ directory you can simply replace your files with the ones contained in that directory. Make sure to make a backup first. If you already have mod's installed or want to perform the modification yourself then follow these instructions:

3. Open up maincore.php in your PHP-Fusion root and before:

     redirect(BASEDIR."setuser.php?error=3");


4. Add this:

  // -- START RECORD BAD LOGIN -- \\
  if(file_exists(INFUSIONS."bad_login/admin.php")){
    $result = dbquery("INSERT INTO ".$db_prefix."bad_login VALUES('', '".USER_IP."', '".time()."', '".$_POST['user_name']."')");
    $check = dbquery("SELECT * FROM ".$db_prefix."bad_login WHERE login_ip='".USER_IP."'");
    $cdata = dbarray($check);
    if(dbrows($check) >= 10){
      $blacklist_ip = USER_IP;
      $blacklist_email = "";
      $blacklist_reason = "10 failures @ login";
      $list = dbquery("INSERT INTO ".$db_prefix."blacklist VALUES('', '$blacklist_ip', '$blacklist_email', '$blacklist_reason')");
    }
  }
  // -- END RECORD BAD LOGIN -- \\


5. Save, upload and then goto Infusion Management and infuse "Bad login"

6. To view admin go to infusions and choose the "Bad Login Manager"

CHANGE LOG
----------

v2
------
* Updated for the V7.00 core

v1.0.2
------
* No longer stores incorrectly entered passwords, only usernames.
* Automatically blacklists IP's after 10 failed login attempts.