vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Admin Protection (https://vborg.vbsupport.ru/showthread.php?t=116041)

cerjam 05-18-2006 10:00 PM

Admin Protection
 
I couldent find anything like this, even if it is so simple, anywhere on here so i decided to make it myself..

Description:
Checks IP of moderator or administrator before allowing access to mod/admincp or editing threads.

Requires mods to functions_login.php,postings.php,inlinemod.php, txt file named ippool.txt in forum root directory,apparse.php uploaded to forum root,ipauth.php uploaded to forum root.

Instructions for install:


1.download attachments
2.open adminprotection.php and edit the variables to their correct settings.
3.upload ipauth.php,apparse.php,adminprotection.php,ippool. txt to forum root
4.find..
Code:

                // admin control panel or upgrade script login
        if ($logintype === 'cplogin')
        {

in includes/functions_login.php and add under
Code:

//admin protection
        include 'adminprotection.php';
        checklogin();
//end admin protection

5. find..
Code:

        if ($logintype === 'modcplogin')
        {

and add below
Code:

//admin protection
        include 'adminprotection.php';
        checklogin();
//end admin protection

6. find..
Code:

switch ($_REQUEST['do'])
{
        case 'openclosethread':
        case 'dodeletethread':
        case 'dodeleteposts':
        case 'domovethread':
        case 'updatethread':
        case 'domergethread':
        case 'dosplitthread':
        case 'stick':
        case 'removeredirect':
        case 'deletethread':
        case 'deleteposts':
        case 'movethread':
        case 'editthread':
        case 'mergethread':
        case 'splitthread':

in posting.php(located in forum root) and add above..
Code:

//admin protection
        include 'adminprotection.php';
        checklogin();
//end admin protection

7. find..
Code:

switch ($_POST['do'])
{
        case 'open':
        case 'close':
        case 'stick':
        case 'unstick':
        case 'deletethread':
        case 'undeletethread':
        case 'approvethread':
        case 'unapprovethread':
        case 'movethread':
        case 'mergethread':

in 'inlinemod.php' in forumroot, add
Code:

//admin protection
        include 'adminprotection.php';
        checklogin();
//end admin protection

in between the
Code:

switch ($_POST['do'])
{

and
Code:

        case 'open':
        case 'close':
        case 'stick':
        case 'unstick':

8. CHMOD apparse and adminprotection.php to 777
9. visit http://yoursite.com/ipauth.php and enter your ip and click submit
10. repeat for all admins/moderators on your forum
11. you're finished!

*note this hack does not work with a dynamic ip yet, i plan to add it later on.

Future Mods:
Switch to MySQL table,Support for DSL/dialup IPs,Save to database on all unauthorized logins

Boofo 05-19-2006 06:25 AM

You know IPs can be spoofed, right? ;)

Oblivion Knight 05-19-2006 07:51 AM

I've unfortunately had to remove the attachment for the time being..

Hopefully the author can make some necessary adjustments to the installation, and it can be re-uploaded again shortly.

cerjam 05-19-2006 08:35 AM

all fixed, organized the code alot better too =) Now will send email/log to file when unauthorized user tries to login.

Oblivion Knight 05-19-2006 08:49 AM

Thanks for the quick fix-me-up cerjam, it is much appreciated. :)

Ziki 05-19-2006 11:14 AM

And if my PC breakes donw?huh?

mholtum 05-19-2006 12:10 PM

I suppose you have never tried to login at more tham one PC. HMM not sure this is such a good Idea. Unless you have a static IP this is not good.

fcreature 05-19-2006 12:55 PM

Quote:

Originally Posted by mholtum
I suppose you have never tried to login at more tham one PC. HMM not sure this is such a good Idea. Unless you have a static IP this is not good.

That is common sense and i'm really tired of hearing people complain and moan about the usage of modifications. This is not simply directed towards you mholtum. Time and time again, when someone creates a piece of work someone always has to come out of their hole and try to make a claim as to why the modification "is not good or should not be used". I'm pretty sure if people wanted to use their admincp at other terminals they would make intelligent arragements to do so. It's a code, we shoulden't have to hear debates about why people shoulden't add this or that to their community because of unpractacality or your take on various ethical issuues.

I'm not coming back into this thread so don't waist your time.

Good work cerjam by the way

:banana:

Ntfu2 05-19-2006 02:13 PM

Quote:

Originally Posted by mholtum
I suppose you have never tried to login at more tham one PC. HMM not sure this is such a good Idea. Unless you have a static IP this is not good.


Well then i suppose you can just got right back into ipauth.php and add your new ip :idea:


one a side note it would be a pain in the butt for dial up folks, does this support wildcards?

C_P 05-19-2006 02:24 PM

Quote:

Originally Posted by fcreature
That is common sense and i'm really tired of hearing people complain and moan about the usage of modifications. This is not simply directed towards you mholtum. Time and time again, when someone creates a piece of work someone always has to come out of their hole and try to make a claim as to why the modification "is not good or should not be used". I'm pretty sure if people wanted to use their admincp at other terminals they would make intelligent arragements to do so. It's a code, we shoulden't have to hear debates about why people shoulden't add this or that to their community because of unpractacality or your take on various ethical issuues.

I'm not coming back into this thread so don't waist your time.

Good work cerjam by the way

:banana:

AMEN!


All times are GMT. The time now is 07:37 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.01650 seconds
  • Memory Usage 1,746KB
  • 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
  • (10)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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