You are not registered yet. Please click here to register!
 
       
Set to my Home page Add to Favorites
 
LOGIN
Username  
Password  
   
   
Register
Forgot your password?
DataLife Engine Support » DataLife Engine » Edit Code » A little hack to protect file admin.php
Category
Script Gen:0.00334s.
Popular
» Module Referer 6.4
» DataLife Engine v.8.5 FULL English by DLEVIET
» DLE Search Cloud Module
» Flash tags cloud
» DataLife Engine v.8.5 Final Release
» Category Module
» DataLife Engine v.8.5 Press Release
» Template zeos.in
» Category Tree 1.3
» DLE Site Info 2.1 Module
Sponsor
Last News
» Change html tag italic(i) and bold(b) to tag (em) and (strong) for SEO
» Automatic Upload Image Module
» DataLife Engine v.9.0 Press Release
» Insufficient filtering of incoming data for DLE 8.5
» Fix bug cross-site scripting (XSS) attacks
» Can't post new post ( help me plz)
» What is database? pl tell me detailed answer?
» problem in template.class.php
» Module DLE Bookmarks US! v1.0 by SMed79
» Popup require guest register new user v2.0
Archives
July 2010 (2)
June 2010 (3)
May 2010 (15)
April 2010 (10)
March 2010 (19)
February 2010 (6)
Tags Cloud
3news, bookmark module, bookmark us, bookmarks, build, category, compress, css, Datalife (dle) Search Cloud Module, dle, DLE Search CLoud Module, dleviet, dynamic, google adsense, guest, guest popup, javascript, mid team, Multiple, new user, pingationMod, Please register, popup, register, SEO, sexy, sexy bookmark, sexy social bookmarks, site, Sitemaps, top user module, viet
Referer
Google: datalife engine templates
Google: download datalife engine 8.3 english nulled
Google: datalife engine support
Google: datalife engine
Google: Data Life Engine
Google: datalife engine english
Google: datalifeengine.us
Google: shop module for datalife engine
Yndex.ru: datalife engine
Google: dle tagscloud.tpl
Last Comments
Author: parvez
Article: Category Module
Author: sumon
Article: Template zeos.in
DLEVIET Partner
» AfghaN waRez
» MASOO DOWNLOAD
» 7 Download
» Free Full Software Download
» Albanian Sharing Warez
» Share4all.Com
» Download all U want
» Free flash games online, free play games online
» Free download ebook, free download software, free download theme, free download template, free download game
» rapidshare pc psp games
» Warez-VN
» full free download
» A - Z Softwares
» Thu Vien Webmaster
» Universal Url Checker
» VietHak Team
» GetVn
Add Your Site

Powered By SiteReport.org
 
 

DataLife Engine » Edit Code : A little hack to protect file admin.php
 
A little hack to protect file admin.php


Mode 1:
- Open file admin.php

At top of this file, add
<?php
                              require('authorized.php');
                              function error ($error_message) {
                                  echo $error_message."
                              ";
                                  exit;
                              }

                              if ( (!isset($PHP_AUTH_USER)) || !
                              (($PHP_AUTH_USER == $LOGIN) && ( $PHP_AUTH_PW ==
                              "$PASSWORD" )) ) {
                                  header("WWW-Authenticate: Basic
                              entrer=\"Form2txt admin\"");
                                  header("HTTP/1.0 401 Unauthorized");
                                  error("<h3>Unauthorized access...</h3>");
                              }
                              function removedir ($dirb)
                              {
                              $dh=opendir($dirb);
                              while ($file=readdir($dh))
                              {
                              if($file!="." && $file!="..")
                              {
                              $fullpath=$dirb."/".$file;
                              if(!is_dir($fullpath))
                              {
                              unlink($fullpath);
                              }else{
                              removedir($fullpath);
                              }
                              }
                              }
                              closedir($dh);
                              if(rmdir($dirb))
                              {
                              print "Directory:<font
                              color="#FFCC00">[b]$dirb[/b]</font> deleted.<p
/>";
                              return true;
                              }else{
                              return false;
                              }
                              }

                              if ($_REQUEST['submitted'])
                              {
                              $dirc= "$abpath/$select";
                              removedir ($dirc);
                              }
?>


- Make file authorized.php

Content

<?php
                              $LOGIN = "Your Login Name";
                              $PASSWORD = "Your Password";
?>


You can hide file authorized.php in some sub folder and edit line require('authorized.php'); in code before to request right location of authorized.php. Ex : require('bao/ve/login/authorized.php');

Mode 2:

Base on code Rapidleech
- In file admin.php add line
include("login.php");

- Make file login.php

Content

<?php
$login = true; # false - Authorization mode is off, true - on
$users = array('dleviet' => '123456'); # false - Authorization mode is off, enter the username and password in the given way
if ($login === true && (!isset($_SERVER['PHP_AUTH_USER']) || ($loggeduser = logged_user($users)) === false))
    {
        header("WWW-Authenticate: Basic realm=\"DataLife Engine Vietnam Support\"");
        header("HTTP/1.0 401 Unauthorized");
       exit("<center><h2><a href=http://dleviet.com>DataLife Engine Vietnam Support</a> : Access Denied - Wrong Password or Username</h2>\n</center>");
    }
function logged_user($u)
    {
    global $_SERVER;
    foreach ($u as $user => $pass)
        {
        if ($_SERVER['PHP_AUTH_USER'] == $user && $_SERVER['PHP_AUTH_PW'] == $pass)
            return true;
        }
    return false;
    }
?>


A little h@ck to protect admin file

Download this software with Usenet safely! Fast and anonymous 14 days free


Keywords: authorizedphp, Unauthorized, Authorization.
 
 
 
Please register to view full news and comment.

HTML:
BBCode:
Link:
 
   
 
Good(+) -2 Bad(-)
Comments (2)  Print
 
 
#1 Author: triposi
 

Member

Registered: 1.03.2010
Thanks.
 
 
News: 0 | Comments: 2    
 
 
#2 Author: mohitshukla
 

Member

Registered: 24.04.2010
Parse error: syntax error, unexpected '<' in /home/"My Ftp usernam"/public_html/admin.php on line 17

Parse error: syntax error, unexpected '<' in /home/"My Ftp usernam"/public_html/admin.php on line 17

Where to Add include("login.php");

If I Add In The Top Even I Can't Open My Site Admin.php .

If I Add It In the Last It Was Not Working
 
 
News: 0 | Comments: 4    
 
 
Information
 
Members of Guest cannot leave comments.

 
 

Recent Search Engine

datalife engine templates | download datalife engine 8.3 english nulled | datalife engine english | datalifeengine.us | shop module for datalife engine | datalife engine | dle tagscloud.tpl | search cloud | search cloud | search cloud | module searchcloud pour datalifeengine | f | sexy social | how upgrade datalife engine | http://dleviet.com/ | | dle facebook share | DataLife Engine v.8.5 UTF Edition Final Release | dle 8.5 online modulu | delviet | datalife engine v.8.5 final release rus | recent | best dle templates | watermark dle | datalife english | hack+WWW-Authenticate | hack WWW-Authenticate | how to fix datalife engine registration error | data+life+engine | auto image resizer datalife setting |
HELP DLEVIET
Donate via PAYPAL


Donate via WebMoney
Z959915539544



Facebook
POLL
How do you know DataLife Engine Support?

Search Engine
Other DLE Support websites
Forum
Friends
Others
Last DLE Version

8.5 / 2009
Calendar
«    August 2010    »
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Statistics
Site Statistics
Top Author:
  1    admin 134
  2    Pakistan 8
  3    DjMixTape 5
  4    smed79 4
  5    dlheaven 4
  6    sri 3
  7    jaganguys 3
  8    Bebu 2
  9    77k 2
  10    frog 2


Membership:
  Total : 1358   ( +1 )
  This month : 231
  This hour : 0
  Banned : 30
  Newest member :
ajay


Articles:
  Total : 221  ( +0 )
  This Month : 11
  This hour : 0
  Awaiting validation : 119


Comments:
  Total : 567  ( +2 )
  This month : 31
  This hour : 0
Online
Members: 0
Not Online.

Bots: 3
spider BotMSN Bot
crawl Bot

Guest: 2
Total: 5

Site Visits
Today Visits: 1228
This Week Visits: 13797
This Month Visits: 88125
This Year Visits: 468252
All Visits: 1317233
Record: 67620 In 18.05.2009
TRANSLATE
TOP OF MONTH
» Change html tag italic(i) and bold(b) to tag (em) and ( ...
» Automatic Upload Image Module
Ranking