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)

Renegade 08-11-2002 10:57 AM

Very useful hack, but what if I wanted an email to also go to my Super Moderators as well?

Greystang302 08-11-2002 03:27 PM

[QUOTE]Originally posted by Boofo
Where can I get that version? I can't seem to find it here. :surprised:

Boofo 08-11-2002 10:35 PM

But with all of the code in this thread, what is the final best working version? I am on a Linux server if that changes anything.

[QUOTE]Originally posted by Greystang302

You can find it on a previous page within this thread.

Erwin 08-12-2002 10:06 AM

Use this one without any modifications - it works.

Post #108

https://vborg.vbsupport.ru/showthrea...079#post232079

curley 08-12-2002 10:20 AM

Sorry but 11 pages...does anyoen know where the final version is?

Erwin, is it in the entire post by 'Mutt' per your link above?

Thanks all!

j

Erwin 08-12-2002 10:23 AM

Yes - put his code into the 2 files he suggests.

Boofo 08-13-2002 08:47 PM

I'm getting 3 emails with this code. The first one shows no username bit gives me a code in the password line, the second shows all of the info and the third shows all of the info plus an extra sessions name line. Any ideas why this is happening?

[QUOTE]Originally posted by Mutt
[B]firefly, I've added alittle to your hack

Here's the chunk of code that needs to be added to 2 files

PHP Code:

            // email alert
            
$ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_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 to the $bbtitle control panel!\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$MessageAddon";
            
mail($webmasteremail,"Warning: vBulletin Admin Login Attempted",$message,"From: \"$bbtitle Admin CP\" <$webmasteremail>");
            
// email alert 


mashby 08-28-2002 04:21 AM

Piece of cake to install and a super cool hack. Thanks Firefly!

Gaz.t 08-28-2002 12:15 PM

Thank you very MUCH :D

Greystang302 09-01-2002 09:45 PM

Anybody using this with version 2.2.7? I am getting ready to upgrade, and checking to see if all of my hacks are working successfully with the newest version. Thanks!

esemay 09-01-2002 10:15 PM

It works with 2.2.7. I just did the upgrade last night and reapplied it and everything went OK

shawn

FleaBag 09-03-2002 01:41 AM

Working on 2.2.7, thanks. :)

Rodney 09-04-2002 08:31 PM

could you get this hack to work whith any name and not just admin names..

using vb 2.2.7...... great hack thou :)

Gaz.t 09-05-2002 09:50 AM

work fine on 2.2.7 for me too :)

Greystang302 09-06-2002 02:09 AM

Yep, working for me on vb 2.2.7 also. Just upgraded tonight. :)

PHiXTiT 09-14-2002 03:38 AM

GReaT HaCK!!!

5 STaRz

BetaMax 09-16-2002 06:31 PM

Works great in V2.2.7

Arekusan 09-18-2002 06:48 PM

Is is supposed to record also the GOOD attempts? coz i got them reported too! :paranoid:

grooveh 09-22-2002 12:55 PM

FireFly: Your hacks are always top shelf in my book. Thanks for another fine piece of work!! You rule in my books!!

Tailfeathers 09-27-2002 03:40 AM

Very nice. Thanks!

digitalJE5U5 10-09-2002 07:59 AM

Ive tried this "simple" hack 25 times. All from fresh copies of sessions.php. I've tried to log into admin CP using real names/wrong pass and using wrong names/passes. I've never got a single email.

Whats up?

Runnin version 2.2.7

/DJ

[email protected] vbmenu_register("postmenu_308718", true); 10-11-2002 07:46 PM

Works great. 2.2.7

digitalJE5U5....are you sure your webmaster email address is correct in your admin cp?

digitalJE5U5 10-11-2002 11:09 PM

Im positive. Using this on 2.2.7. But, I've read it works on that too.

:cry:

/DJ

Talisman 10-13-2002 03:56 PM

Love the hack. Just caught myself trying to sneak into my Admin CP.... whew!

And when I checked who was up to no good ...... sure enough, it was me!!

(BTW, I'm getting two copies of the email notice, but that's not a problem.)

Thanks for all the great hacks, everyone. :banana:

ravenshadow 10-25-2002 02:33 PM

Works great.. 2.2.8

Thank you

Littlebit 10-27-2002 03:42 PM

Working great with 2.2.8 for me too. Thanks Firefly :bunny:

sklwer 10-27-2002 10:12 PM

I tried to use Matts ( post 107 ) but I am having dificculy understanding.. The first Hack is easy to understand but the second Hack says "then second additon is in adim/global.php

and it goes right after

PHP:

$getperms=$DB_site->query_first("SELECT cancontrolpanel FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND user.userid='$bbuserinfo[userid]'");
if ($getperms[cancontrolpanel]!=1) {

So the second hack go right after what??? what am i missing?

Erwin 10-27-2002 10:28 PM

It's Mutt, not Matt. :)

https://vborg.vbsupport.ru/showthrea...079#post232079

In the second part, he is saying to open admin/global.php and FIND:

PHP Code:

$getperms=$DB_site->query_first("SELECT cancontrolpanel FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND user.userid='$bbuserinfo[userid]'"); 

Then after that, PASTE THE SAME CODE you used in the first part.

Hope that clears it up a bit.
if ($getperms[cancontrolpanel]!=1) {

sklwer 10-27-2002 10:39 PM

There is no " $getperms=$DB_site->query_first("SELECT cancontrolpanel FROM user,usergroup WHERE user.usergroupid=usergroup.usergroupid AND user.userid='$bbuserinfo[userid]'"); on Version 2.28 Global.php

sklwer 10-27-2002 10:40 PM

Soory I was looking at /Global NOT admin/global sorry

Erwin 10-27-2002 11:06 PM

No problems, easy mistake to make. :)

FleaBag 10-28-2002 10:28 PM

Up and running on 2.2.8. Thanks again! ;)

DieselGino 11-04-2002 04:01 PM

i can't even find
PHP Code:

    if (md5($loginpassword)!=$bbuserinfo[password]) { 


Dynamic One 11-10-2002 08:25 PM

Thanks for this great hack.

!!!cyr0n_k0r 11-11-2002 10:36 PM

firefly.. is there a way to make this hack so that if someone that was a registered user on your forums tried to sneak in and failed.. it would tell you.

I know it gives you the IP addres.. but could it compare to the stored IP's for all the users and if there is a match say which user had that IP?

so you know if its someone on your board you can confront them?

Sebastian 11-18-2002 12:48 AM

This works great except one part...

I get this for these two fields.

The IP address is: www.mydomain.com
The host is:

for IP it show my domain and nothing for host.. any ideas?

Sebastian 11-20-2002 01:13 AM

-bump-

This is odd, any ideas why my ip is showing up as my domain name, and no host mask?

sonicghost 11-23-2002 01:06 PM

Were can I find session.php.

Sorry ! New guy

Sebastian 11-23-2002 01:57 PM

[QUOTE]Originally posted by sonicghost
Were can I find session.php.

94supratt 12-18-2002 05:47 AM

Thanks for the hack. I just got my forum up and am new to hacking. This is one of the few hacks that I've been able to work :D I'm a newbie.


All times are GMT. The time now is 06:35 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.01470 seconds
  • Memory Usage 1,804KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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