...

View Full Version : how to remove login script, need help please



mjs
06-20-2010, 06:47 AM
Hi,

i wondering if someone can help me to remove login script:

the script look like:


if(@$_COOKIE['admincp'] == md5($admin_username.$admin_password)){
if(@$_GET['p'] == 'logout'){
logout();
}else{
html_interface();
}
}else{
if(@$_POST['login'] == $admin_username && @$_POST['password'] == $admin_password){

setcookie('admincp', md5($admin_username.$admin_password), time()+3600, '/', false);

//reload
echo '<meta http-equiv=refresh content=0;URL=?>';
}else{
html_login();
}
}

function contents(){

$page_request = @$_GET['p'];

switch($page_request){
case 'pages' : pages(); break;
case 'comments' : comments(); break;
case 'thumbnails' : thumbnails(); break;
default : homepage(); break;
}

}

any help would be welcome and many thanks

DJCMBear
06-20-2010, 11:54 AM
what is it your trying to do as if you want to remove the login script why cant you just take it out the code??

jfreak53
06-20-2010, 11:57 AM
This is the code that checks login:


if(@$_COOKIE['admincp'] == md5($admin_username.$admin_password)){
if(@$_GET['p'] == 'logout'){
logout();
}else{
html_interface();
}
}else{
if(@$_POST['login'] == $admin_username && @$_POST['password'] == $admin_password){

setcookie('admincp', md5($admin_username.$admin_password), time()+3600, '/', false);

//reload
echo '<meta http-equiv=refresh content=0;URL=?>';
}else{
html_login();
}
}

And you just get rid of it and replace with the html_printout function which is:


html_interface();

Now the only problem is this is just the login script. So you still have to find out where the auth file is, because in that code it sets your sessions variables. So somewhere else it checks session variables and compares. So still have to find your auth file.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum