
| Tutorials Main Latest Tutorials Popular Tutorials Top Rated Tutorials |
| Login to See your Favorite Tutorials |
| Description: This tutorial was created by Zulkipy and we do not claim any ownership or credit for this tutorial. Just added it because we felt it was a very usefull piece of information. | |
| Version: 1.0 | |
| Added on: 08 July 2007 | |
| Author: Zulkipy | |
| Difficulty Level: Easy | |
| Views: 1854 | |
| Rating: 10.0 (2 Votes) | |
Even during the installation phase of phpnuke, we are told to change the admin.php. Here are a few lines found on top of config.php
# $admin_file: Administration panel filename. "admin" by default for
# "admin.php". To improve security please rename the file
# "admin.php" and change the $admin_file value to the
# new filename (without the extension .php)
Thats it! But how many of us have change it?
Let us start.
1) Fire up your config.php which is in the root (if you have not move it elsewhere).
Then find for this line:
| Code: |
|
$admin_file = "admin"; |
| Code: |
|
$admin_file = "hibiscus"; |
| Code: |
|
DELETE from nuke_blocks where bid=2 and bkey='admin'; INSERT INTO nuke_blocks VALUES (2, 'admin', 'Administration', '<strong><big>·</big></strong> <a href="hibiscus.php">Administration</a><br> <strong><big>·</big></strong> <a href="hibiscus.php?op=adminStory">NEW Story</a><br> <strong><big>·</big></strong> <a href="hibiscus.php?op=create">Change Survey</a><br> <strong><big>·</big></strong> <a href="hibiscus.php?op=content">Content</a><br> <strong><big>·</big></strong> <a href="hibiscus.php?op=logout">Logout</a>', ', 'l', 2, 1, 0, '985591188', ', ', 2, '0', 'd', 0); |
| Code: |
|
"if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); } |
| Code: |
|
if ( !defined('ADMIN_FILE') ) { die("Illegal File Access"); } |
| Code: |
|
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); } if ($radminsuper==1) { adminmenu("admin.php?op=BlocksAdmin", ""._BLOCKS."", "blocks.gif"); } |
| Code: |
|
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); } |
| Code: |
|
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); } |
| Code: |
|
<? //Set the date so we can store it in the text file. $tdate = date("dS F Y h:i:s A"); //Check if there is a referer if (!$HTTP_REFERER) { $HTTP_REFERER = "(NONE)"; } $ip = getenv("REMOTE_ADDR"); $browser=$_SERVER['HTTP_USER_AGENT']; $page = $_SERVER['REQUEST_URI']; //Store it in the log.html file ! DONT FORGET TO SET COUNTER.TXT CHMOD 777 ! $fp = fopen("log.html", "a"); $line = "$tdate | IP: $ip | Browser:$browser | Page: $pagen "; fwrite($fp, $line); fclose($fp) ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Oops! You are not authorised to view this page </head> <body> <h3>You do not have permission to access this page/directory. [error 401] <p>... Get out from here! </body> </html> |
| Code: |
|
<?php include("../config.php"); ?> |