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)

Jawelin 03-09-2002 09:57 AM

.htaccess on Apache web-server.
It does protect the urls (from a given directory with all children..)

Another question: HOW COULD I read the bboard cookies on cracker browser and send them along with the phpinfo (above) email ?
Thanks again.

Shane_2k 03-09-2002 10:02 AM

Thnx but i have no idea but i will have a go and also how do u do this

(in attachment)

Jawelin 03-09-2002 12:15 PM

[QUOTE]Originally posted by Shane_2k
Thnx but i have no idea but i will have a go and also how do u do this
(in attachment)

Erwin 03-13-2002 06:28 PM

Hi, would this work for 2.2.4?

Got home from work - installed the hack - no problems there, but I am not getting any emails sent to me.

Checked my VB options, the email address is correct, it works, just tested it...

Mmm... maybe it's my server... I'm with VO...

pdaGuy 03-15-2002 08:08 AM

Same here Erwin.
Installed the hack but I don't get any emails!
Anyone managed to fix it??

Mutt 03-16-2002 12:20 PM

not sure if this works yet. just playing around with it so if anyone can think of how to fix/improve it let me know.

I added the scriptpath, real username as found from cookie, real username as found from sessions, and a link to search for username using that ip

PHP Code:

            // email alert
            
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST);
            
$iphostname = @gethostbyaddr($ipaddress);
            if (
$sessionid=$DB_site->query("SELECT userid FROM session WHERE host='$ipaddress'")) {
                
$realusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$sessionid[userid]'");
                
$MessageAddon .= "Sessions identifys them as ".addslashes($realusername);
            }
            if (
$HTTP_COOKIE_VARS['bbuserid']) {
                
$realuserid $HTTP_COOKIE_VARS['bbuserid'];
                
$realusername=$DB_site->query_first("SELECT username FROM user WHERE userid='$realuserid'");
                
$MessageAddon .= "Thier cookie identifys them as ".addslashes($realusername);
            }
            
$message="Someone is trying to login using your admin account!\nThe Script was : ".addslashes($scriptpath)."\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\n$MessageAddon";
            
mail($webmasteremail,"Warning: vBulletin Admin Login Tried",$message,"From: \"$bbtitle Admin CP\" <$webmasteremail>");
            
// email alert 


pdaGuy 03-17-2002 10:39 AM

Thanks Mutt, it's working now! (on version 2.2.4 too) ;-)

trainer 03-21-2002 03:32 PM

Mutt i have tried your version and the original version but no luck with 2.2.4

does yours work with 2.2.4? i like the idea alot.

maybe i am doing something wrong cause i did have this hack installed before with version 2.2.1

thanks for the help

trainer 03-21-2002 03:58 PM

got it working for the most part but can't seem to get any memberinfo from the cookies

doesn't identify anyone. i logged into the forums under a test account then did a bogus login to the admin section and i only got this message in teh email alert

Sessions identifys them as Thier cookie identifys them as Array

Mutt 03-21-2002 08:00 PM

I can't get it to work. I can't even get it to email me :( Code looks like it should work but I just can't test it


All times are GMT. The time now is 04:58 AM.

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.01304 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_php_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