vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Get an e-mail if someone is trying to access your Admin CP (With IP address) (https://vborg.vbsupport.ru/showthread.php?t=32707)

Admin 11-25-2001 10:00 PM

Here's my version:

In sessions.php find this code:
Code:

    if (md5($loginpassword)!=$bbuserinfo[password]) {
right below it, add this code:
Code:

                        $ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
                        $iphostname = @gethostbyaddr($ipaddress);
                        $message="Someone is trying to login using your admin account!\n\nUsername he tried to use: $loginusername\nPassword he tried to use: $loginpassword (".md5($loginpassword)." in encryption)\n\nThe IP address is: $ipaddress\nThe host is: $iphostname";
                        mail($webmasteremail,"Warning: vBulletin Admin Login Tried",$message,"From: \"$bbtitle Admin CP\" <$webmasteremail>");

You will get a message:
Quote:

Someone is trying to login using your admin account!

Username he tried to use: xxx
Password he tried to use: xxx (xxxxxxxxxxxxxxxxxxxx in encryption)

The IP address is: xx.xx.xx.xx
every time someone is trying to login to the admin cp with no success.

Have fun. :)

Lesane 11-26-2001 02:12 PM

Thanks flyfire :)

xcal 11-26-2001 02:51 PM

just installed and tested fine :)
be interesting to see how many people are sneaking around, the admin cp :)

Admin 11-26-2001 02:59 PM

Lesane, it's FireFly, not FlyFire. ;) :p
Thanks.

Just a note, if you test this and don't get an e-mail after 3 seconds, don't panic and scream it's not working.
It probably takes a while for the e-mail to arrive. :)

pipi 11-26-2001 03:19 PM

IS that possible use this code for admin centre? how? thanks
Code:

$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
        $DB_site->query("INSERT INTO loginlog (id, ip, username, password, atime) VALUES ('','$ipaddress', '$username', '$password', '".time()."')");


Lesane 11-26-2001 04:13 PM

[QUOTE]Originally posted by FireFly
Lesane, it's FireFly, not FlyFire. ;) :p
Thanks.

mem 11-26-2001 04:18 PM

It's great and working now.
Thank you, FireFly. :D :D

tweak 11-26-2001 06:06 PM

THANX!! Great HACK!

FWC 11-26-2001 06:20 PM

Another good one, Firefly! :)

|DarkManX| 11-26-2001 07:26 PM

Excellent hack!!!

thanks firefly!


All times are GMT. The time now is 09:02 PM.

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.01432 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete