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)

glo 12-25-2002 11:36 PM

g'day Firefly,

I installed this hack onto 2.2.9 and it did not send any email notification to me at all!

I left it for a while incase it was a mail server issue, but still no notifications.

But, strangely and no more importantly, it corrupted the forums to the point that my hidden forum was being displayed! :confused:

I wasnt able to log into my admin area either! (with the correct u/name & p/word)

If you have any suggestions that would be great! as i have had to revert back to the original code.

sbryan 01-01-2003 11:10 PM

hey guys, great hack got it working on 2.2.8 with the following code
Quote:

// email alert
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("R EMOTE_ADDR"),$HTTP_HOST);
$iphostname = @gethostbyaddr($ipaddress);
if ($HTTP_COOKIE_VARS['bbuserid']) {
$realuserid = $HTTP_COOKIE_VARS['bbuserid'];
$realusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$realuserid'");
$MessageAddon .= "\nThier cookie identifys them as ".addslashes($realusername[username]."\n");
}
if ($sessionids=$DB_site->query("SELECT userid FROM session WHERE host='$ipaddress' AND userid>0 GROUP BY userid")) {
while ($sessionid = $DB_site->fetch_array($sessionids)) {
$realusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$sessionid[userid]'");
$MessageAddon .= "\nSessions identifys them as ".addslashes($realusername[username]);
}
}
$message="Someone is trying to login using your admin account!\nThe Script was : $PHP_SELF\n\nUsername they tried to use: $loginusername\nPassword they tried to use: $loginpassword (".md5($loginpassword)." in encryption)\n\nThe IP address is: $ipaddress\nThe host is: $iphostname\n\nSearch for members using this ip\n $bburl/admin/user.php?action=doips&s=&ipaddress=$ipaddress\n$Me ssageAddon";
mail($webmasteremail,"Warning: vBulletin Admin Login Attempted",$message,"From: \"$bbtitle Admin CP\" <$webmasteremail>");
// email alert
and it sends me a nice email like the following (when i tested it out myself)

Quote:

Someone is trying to login using your admin account!
The Script was : /forum/admin/index.php

Username they tried to use: XXX
Password they tried to use: XXX

The IP address is: 144.132.3.232
The host is: CPE-144-132-3-232.vic.bigpond.net.au

Search for members using this ip
http://www.xboxworld.com.au/forum/ad...=144.132.3.232

Thier cookie identifys them as XXX

Sessions identifys them as XXX
awesome stuff, way to go guys!

drumsy 01-03-2003 09:41 PM

Installed above version! :)

arracing 01-17-2003 12:25 AM

I would say I am fairly good with installing hacks and whatnot. But I could not get this to work with 2.2.5 and I got a parse error text at the top of my forums when i installed it. Very strange. Im confuseled

Red Blaze 02-10-2003 04:55 PM

Nice, it works perfectly. :)

EDIT: I mean the older version. ^^;; I just saw this new version. Where do I insert all that? :ermm:

sbryan 02-10-2003 07:43 PM

damn. upgraded to 2.2.9 and now ive got to reinstall it!!!

TranceMaster 02-10-2003 07:52 PM

so does this work for 2.2.9 then people? just checking before i install it :)

sbryan 02-10-2003 08:07 PM

no reason why not. every other hack ive installed has worked so far but now youve gone and made me paranoid :) so ill wait too :)

memdy 02-11-2003 06:50 PM

Works for my 2.2.9, but having trouble sending to multiple recipients.

FleaBag 02-25-2003 06:39 AM

Working great with the updated version posted, using 2.3.0.


All times are GMT. The time now is 10:00 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.01454 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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