1. Trang chủ
  2. » Công Nghệ Thông Tin

Hacker Professional Ebook part 325 pdf

6 58 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Hacker Professional Ebook Part 325 Pdf
Thể loại ebook
Định dạng
Số trang 6
Dung lượng 116,3 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

source/admin/admin_functions.php tìm tất cả những từ conf_global.php thay bằng abc.php Tìm trong 3 file : admin.php , index.php , ssi.php tất cả những từ conf_global.php thay bằng abc.ph

Trang 1

source/admin/admin_functions.php

tìm tất cả những từ conf_global.php thay bằng abc.php

Tìm trong 3 file : admin.php , index.php , ssi.php tất cả những từ conf_global.php thay bằng abc.php

Sau đó đổi file conf_global.php thành abc.php

Session ID :

+Bước 1:

Mở file ad_settings php

Tìm code sau:

case 'dourl':

$this->save_config( array ( 'number_format', 'html_dir','safe_mode_skins',

'board_name','board_url','home_name','home_url', 'disable_gzip',

'html_url','upload_url', 'upload_dir', 'print_headers', 'header_redirect', 'debug_level', 'sql_debug' ) );

break;

thay bằng :

case 'dourl':

$this->save_config( array ( 'number_format', 'html_dir','safe_mode_skins',

'board_name','board_url','home_name','home_url', 'disable_gzip',

'html_url','upload_url', 'upload_dir', 'print_headers', 'session_hide',

'header_redirect', 'debug_level', 'sql_debug' ) );

break;

tìm tiếp :

$ADMIN->html = $SKIN->add_td_row( array( "<b>Print HTTP

headers?</b><br>(Some NT installs require this off)" ,

$SKIN->form_yes_no( "print_headers", $INFO['print_headers'] )

) );

thêm đường sau :

$ADMIN->html = $SKIN->add_td_row( array( "<b>Hide Session

ID?</b><br>(Removes Session ID from the URL)" ,

Trang 2

$SKIN->form_yes_no( "session_hide", $INFO['session_hide'] )

) );

bước2 mở index.php

tìm :

if ($ibforums->member['id'] and ( $std->my_getcookie('hide_sess') ) )

{

$ibforums->session_id = "";

}

thêm vào trước :

if ($INFO['session_hide'])

{

$ibforums->session_id = "";

}

+Bước 3:

Mở file conf_global php

Thêm vào bất cứ đâu dòng code sau :

$INFO['session_hide'] = '1';

Code Pass cho Cpadmin, Cpmod :

Bạn dùng cách dưới đây để lập password cho cpadmin, và cpmod để tránh khi bạn quên logout, người khác dùng nick bạn vào quậy phá forum

Demo :

Code:

http://vncool.com/forum/admin.php

Các bạn down load file : secondpass

unzip file đó ra sẽ được 3 file: auth.php, create_pwd.php, htpasswd.txt

file create_pwd.php được dùng để tạo pass cho bạn sử dụng

Trang 3

cách sử dụng:

up load file auth.php và htpasswd.txt vào folder có chứa file bạn muốn bảo vệ open file bạn cần bảo vệ, đặt đoạn code sau vào đầu tiên của file

<?php include "auth.php";?>

up load file create_pwd.php lên host, đâu cũng được miễn là bạn có thể truy cập nó bằng internet explorer

dùng IE để truy cập vô file create_pwd.php, bạn sẽ thấy có dòng:

Enter your password:

bạn type pass word bạn muốn set vào ô bên cạnh, nhấn Encode

khi đó, bạn sẽ nhận được 1 dòng dạng:

Your password has been encoded as: 098f6bcd4621d373cade4e832627b4f6

phần đằng sau dấu ":" (đánh dấu đỏ) chính là password của bạn đã được mã hóa, tạm gọi là pass của bạn

bây giờ vào edit file htpasswd.txt trên host

bạn đổi chữ test thành tên khác mà bạn muốn,

bạn thay thế toàn bộ phần đằng sau dấu ":" bằng chính pass của bạn đã lấy được ở bước trên (bước dùng file create_pwd.php)

sau đó save file htpasswd.txt lại và đổi tên nó thành htpasswd

bạn hãy chú ý tới dấu chấm đằng trước của tên file sau khi đổi tên nhé

bây giờ vào file bạn bảo vệ, bạn sẽ thấy nó sẽ hỏi pass trước khi cho phép bạn truy cập vào

user = user bạn đã nhập thay cho chữ test ở file htpasswd.txt

pass = pass của bạn

Xoá bỏ Session của IBF trên thanh Address :

Trang 4

Tiến hành như sau : mở file

functions.php

Tìm dòng : $this->session_id = md5( uniqid(microtime()) ); thay bằng $this->session_id = "";

Xong

Nhìn IBF gọn gàng & an toàn hơn

Script giúp backup databse :

<?

$appname="Backup MySQL";

$copyright="©Le Van Chuong - VnToDaY";

function sqldumptable($table, $fp=0) {

$tabledump = "\n";

$tabledump.= "# Struc cua table: " $table "\n";

$tabledump.= "DROP TABLE IF EXISTS $table;\n";

$tabledump.= "CREATE TABLE $table (\n";

$firstfield=1;

$fields = mysql_query("SHOW FIELDS FROM $table"); while ($field = mysql_fetch_array($fields)) {

if (!$firstfield) {

$tabledump = ",\n";

} else {

$firstfield=0;

}

$tabledump = " $field[Field] $field[Type]";

if (!empty($field["Default"])) {

$tabledump = " DEFAULT '$field[Default]'";

}

if ($field['Null'] != "YES") {

Trang 5

$tabledump = " NOT NULL";

}

if ($field['Extra'] != "") {

$tabledump = " $field[Extra]";

}

}

mysql_free_result($fields);

$keys = mysql_query("SHOW KEYS FROM $table"); while ($key = mysql_fetch_array($keys)) {

$kname=$key['Key_name'];

if ($kname != "PRIMARY" and $key['Non_unique'] == 0) {

$kname="UNIQUE|$kname";

}

if(!is_array($index[$kname])) {

$index[$kname] = array();

}

$index[$kname][] = $key['Column_name'];

}

mysql_free_result($keys);

while(list($kname, $columns) = @each($index)){

$tabledump = ",\n";

$colnames=implode($columns,",");

if($kname == "PRIMARY"){

$tabledump = " PRIMARY KEY ($colnames)";

} else {

if (substr($kname,0,6) == "UNIQUE") {

$kname=substr($kname,7);

}

$tabledump = " KEY $kname ($colnames)";

}

Trang 6

}

$tabledump = "\n);\n\n";

if ($fp) {

fwrite($fp,$tabledump);

} else {

echo $tabledump;

}

$rows = mysql_query("SELECT * FROM $table");

$numfields=mysql_num_fields($rows);

$datastruc = "# Data cua table: " $table "\n"; fwrite($fp,$datastruc);

while ($row = mysql_fetch_array($rows)) {

$tabledump = "INSERT INTO $table VALUES(";

Ngày đăng: 04/07/2014, 12:20