Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Login log - Log successful login attempts Details »
Login log - Log successful login attempts
Mod Version: 4.1, by Dave (Moderator) Dave is offline
Developer Last Online: Nov 2020 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (5 votes - 4.80 average) Installs: 37
Released: 28 May 2014 Last Update: 16 Jan 2016 Downloads: 245
Supported DB Changes Uses Plugins Re-usable Code External Content  

Hi,

This plugin will allow you to log all successful login attempts of all users.
This can be useful to see if users share their account or if the account of someone got hijacked. Usernames and IP addresses can be clicked.

It will log the following
- Userid
- Username
- IP
- ISP (Internet Service Provider)
- Country
- HTTP user agent

Settings:
- Enable/disable the product.
- Exclude usergroups from being logged.
- Purge the logs.

Picture


Installation
1. Download the .zip file specified.
2. Upload the contents of the upload folder to the root of your forum.
3. Import the product with the .xml file in the import folder.

Note
The script will log using the current time on the server, in case there's a difference between the server time and your local computer time, you can change the offset in the loginlog.php script on line 12.

Also keep in mind that the country and/or ISP resolving might not be 100% accurate and that it might show no value in the logs.

Credits
Telize.com its API is being used to get the ISP and country off the IP address.

Let me know if it works well.


Changelog
11 June 2014 V4: Added the table_prefix global to the login hook.
5 June 2014 V3: Fixed searching only showing the last 25 entries. Pagination will now work as intended.
30 May 2014 V2: Changed hook location, added enable/disable setting and a setting to exclude usergroups.
28 May 2014 V1: Fixed a little mistake with the filter.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	Untitled.jpg
Views:	1221
Size:	87.5 KB
ID:	149210  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 16 Jan 2016, 19:56
tareqbd tareqbd is offline
 
Join Date: May 2011
Originally Posted by Dave View Post
Yes, I uploaded a new one which should work.
Thanks Dave. But it is taking the cloudflare masks. How do I get the real IP.
Attached Images
File Type: png logins.PNG (32.0 KB, 24 views)
Reply With Quote
  #47  
Old 16 Jan 2016, 22:09
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Originally Posted by tareqbd View Post
Thanks Dave. But it is taking the cloudflare masks. How do I get the real IP.
In the "Plugin Manager", find the plugin for this product and change $_SERVER['REMOTE_ADDR'] to $_SERVER['HTTP_CF_CONNECTING_IP'] or IPADDRESS.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #48  
Old 17 Jan 2016, 14:32
tareqbd tareqbd is offline
 
Join Date: May 2011
Originally Posted by Dave View Post
In the "Plugin Manager", find the plugin for this product and change $_SERVER['REMOTE_ADDR'] to $_SERVER['HTTP_CF_CONNECTING_IP'] or IPADDRESS.
Thanks. While checking the functions, I have faced some problems as below.

Warning: Missing argument 2 for vB_Database::execute_query(), called in ..../admincp/loginlog.php on line 41 and defined in ..../includes/class_core.php on line 412

Warning: mysql_query() expects parameter 2 to be resource, null given in ..../includes/class_core.php on line 417
And sql error:

Database error in vBulletin 4.2.2:

Invalid SQL:
;

MySQL Error :
Error Number : 0
Request Date : Sunday, January 17th 2016 @ 02:20:47 PM
Error Date : Sunday, January 17th 2016 @ 02:20:47 PM
Script : http://www.domain.com/admincp/loginlog.php?do=purgenow
Referrer : http://www.domain.com/admincp/loginlog.php?do=purge
IP Address : xxx.xxx.xx.xx
Username : pps
Classname : vB_Database
MySQL Version :
Reply With Quote
  #49  
Old 17 Jan 2016, 14:58
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Did you change anything in the code? That error is never supposed to happen.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #50  
Old 17 Jan 2016, 17:06
tareqbd tareqbd is offline
 
Join Date: May 2011
Originally Posted by Dave View Post
Did you change anything in the code? That error is never supposed to happen.
Not really. I just changed the plugin code as you mentioned for bypassing the cloudflare.
Reply With Quote
  #51  
Old 17 Jan 2016, 17:10
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Could you paste the whole code? You probably made a typo somewhere.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #52  
Old 17 Jan 2016, 17:12
tareqbd tareqbd is offline
 
Join Date: May 2011
Originally Posted by Dave View Post
Could you paste the whole code? You probably made a typo somewhere.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #53  
Old 17 Jan 2016, 17:41
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
That looks fine and works on my local test forum.
The error happens because the MySQL connection resource isn't set, which is really odd.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #54  
Old 17 Jan 2016, 18:03
tareqbd tareqbd is offline
 
Join Date: May 2011
So, what to do now. I actually wanted to remove the logs taken with cf ips.
Reply With Quote
  #55  
Old 27 Oct 2016, 00:16
Iari Iari is offline
 
Join Date: Feb 2011
Perfect! Exactly what I needed.
Thank you so much.
Reply With Quote
  #56  
Old 14 Jan 2017, 14:14
Coder2016 Coder2016 is offline
 
Join Date: Dec 2016
I have the same error. Fix ?

Database error in vBulletin 4.2.2:

Invalid SQL:
;

MySQL Error :
Error Number : 0
Request Date : Sunday, January 14th 2017 @ 02:20:47 PM
Error Date : Sunday, January 14th 2017 @ 02:20:47 PM
Script : http://www.domain.com/admincp/loginlog.php?do=purgenow
Referrer : http://www.domain.com/admincp/loginlog.php?do=purge
IP Address : xxx.xxx.xx.xx
Username : pps
Classname : vB_Database
MySQL Version :
Reply With Quote
  #57  
Old 28 Jul 2017, 05:07
Alice Alice is offline
 
Join Date: Mar 2013
Real name: Alice
I'm having the same issue, anyone with a fix?
Reply With Quote
  #58  
Old 15 Dec 2019, 15:44
edgeless edgeless is offline
 
Join Date: Mar 2013
Same error for me (upon purge attempts):

Database error in vBulletin 4.2.2:

Invalid SQL:
;

MySQL Error :
Error Number : 0
Request Date : Sunday, December 15th 2019 @ 03:28:12 PM
Error Date : Sunday, December 15th 2019 @ 03:28:12 PM
Script : http://www.domain.com/dirname/adminc...hp?do=purgenow
Referrer : https://www.domain.com/dirname/admin...g.php?do=purge
IP Address : xxx.xxx.xxx.xxx
Username : username
Classname : vB_Database_MySQLi
MySQL Version :
Has anyone discovered a solution yet?
Reply With Quote
  #59  
Old 15 Dec 2019, 23:12
edgeless edgeless is offline
 
Join Date: Mar 2013
OK, I believe I've fixed this. Here is what I did...

I changed (line 41) of the purgenow script:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


to this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Basically all you should need to do is change execute_query to query and add a space before and after TRUNCATE TABLE, after which the purges should start working correctly. In any case, this fix seems to work perfectly here. Now every time I execute a purge, the message "The login log has been purged" is properly displayed and all login entries are gone.

Last edited by edgeless; 16 Dec 2019 at 03:30.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 08:54.

Layout Options | Width: Wide Color: