Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Login log - Log successful login attempts Details »»
Login log - Log successful login attempts
Version: 4.1, by Dave Dave is offline
Developer Last Online: Aug 2021 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 05-27-2014 Last Update: 01-15-2016 Installs: 39
DB Changes Uses Plugins
Re-useable Code  
No support by the author.

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

File Type: zip product-loginlog.zip (4.1 KB, 133 views)

Screenshots

File Type: jpg Untitled.jpg (87.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
7 благодарности(ей) от:
elsa23, josner, madness85, minhmeo.info, puertoblack2003, tbworld, winky8300

Comments
  #22  
Old 06-12-2014, 04:44 PM
Bluemax712 Bluemax712 is offline
 
Join Date: Oct 2010
Posts: 186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
Does your MySQL user have access to the TRUNCATE function?
The query itself is correct to truncate the table.

I will fix the other error if you search for nothing, although it doesn't have any priority.
hmm ... not sure exactly how to check access to the truncate function
but running 'show grants' from the mysql command line for the user says:
GRANT ALL PRIVILEGES ON ...WITH GRANT OPTION

===============================
EDIT
running this manually from command line worked :
TRUNCATE vb_loginlog;

but using the loginlog control panel purge function just gives the first error above - like it's not getting any input
Reply With Quote
  #23  
Old 06-12-2014, 06:32 PM
Bluemax712 Bluemax712 is offline
 
Join Date: Oct 2010
Posts: 186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I changed loginlog.php to use "query_write" vs. "execute_query" and it seems to work now
not sure if this is proper way to use it though ...i'm only a former sysadmin and not much of a programmer

$db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "loginlog");
Reply With Quote
  #24  
Old 06-14-2014, 07:30 PM
EvoDarrenshan EvoDarrenshan is offline
 
Join Date: May 2014
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bluemax712 View Post
hmm ... not sure exactly how to check access to the truncate function
but running 'show grants' from the mysql command line for the user says:
GRANT ALL PRIVILEGES ON ...WITH GRANT OPTION

===============================
EDIT
running this manually from command line worked :
TRUNCATE vb_loginlog;

but using the loginlog control panel purge function just gives the first error above - like it's not getting any input
Already did that sir, Still shows cloudflare IP's.
Reply With Quote
  #25  
Old 08-17-2014, 01:47 PM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've altered the loginlog plugin so it logs in mostly all places on the forums (forumhome/forumdisplay), but after a while the loginlog.php is taking ages to load. Is there a way that this system logs on all pages, and "only" logs new information of a user when either the browser OR ip of that user has changed?
Reply With Quote
  #26  
Old 08-17-2014, 01:49 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Skyrider View Post
I've altered the loginlog plugin so it logs in mostly all places on the forums (forumhome/forumdisplay), but after a while the loginlog.php is taking ages to load. Is there a way that this system logs on all pages, and "only" logs new information of a user when either the browser OR ip of that user has changed?
Yea that is possible. A matter of selecting the latest record of the user and compare the IP/browser with the current one, then if there's a mismatch you just log the entry.
Reply With Quote
  #27  
Old 08-17-2014, 02:49 PM
madness85 madness85 is offline
 
Join Date: Jun 2012
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice I will be installing

Got some ideas
It would be great if it could detect ip & create a thread.
Auto prune ips would be nice with option how many days it prunes.
Reply With Quote
  #28  
Old 02-20-2015, 07:18 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I do not trust any external content, can you make a version without it please? Thank you.
Reply With Quote
  #29  
Old 02-21-2015, 10:11 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by X-or View Post
I do not trust any external content, can you make a version without it please? Thank you.
It makes a call to a third party API to get certain information about the IP address such as the ISP/country, etc. I'm not going to make it dependent of nginx/Apache modules so sorry, it will remain as it is. But really, it's no big deal.
Reply With Quote
  #30  
Old 02-23-2015, 11:25 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Most of the time, it may not be big deal indeed, but it's a different story on privacy aware websites. That would violate our current privacy policy.
Reply With Quote
  #31  
Old 02-24-2015, 08:20 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by X-or View Post
Most of the time, it may not be big deal indeed, but it's a different story on privacy aware websites. That would violate our current privacy policy.
The API I use is open-source so you could simply integrate it on your own server and change the API URL I call in the script to your own local URL. https://github.com/fcambus/telize
Reply With Quote
Reply

Thread Tools

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 06:48 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.06614 seconds
  • Memory Usage 2,339KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (7)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete