Main Admin Security - Forum Kurucusu Koruması

bLoOdLusT1912

Kadim Üye
1 Ağu 2007
5,470
41
Forum Kurucusu diğer adminler tarafından silinemez..
bir şekilde oluşabilecek hata ve hacklenmeye karşı faydalı olabilir..



Kod:
############################################### 
##   Hack Title:   Main Admin Security 
##   Hack Version:   1.1.0 
##   Author:      Aiencran 
##   Description:   This hack gives some extra security to the main administrator. 
##          - The other administrators can't delete the Main Admin 
##          - They can't change his profile 
##          - They can't change his user level to simple user 
##   Compatibility:   2.0.10 
## 
##   Installation Level: Easy 
##   Installation Time: 2 Minutes 
##   Files To Edit: 4 
##      admin/admin_ug_auth.php, 
##      admin/admin_users.php, 
##      language/lang_english/lang_admin.php, 
##      language/lang_italian/lang_admin.php 
## 
##   Included Files: None 
## 
##   History: 
##      2004-08-21 - Version 1.1.0 
##         - Added Main Admin's profile security 
## 
##      2004-08-14 - Version 1.0.0 
##         - First version 
## 
##   Author Notes: 
##      In this MOD I supposed that Main Admin's user_id is 2. Feel free to changhe '2' with the id of your MainAdmin. 
## 
##   Support:      None 
##   Copyright:      ©2004 Main Admin Security 1.1.0 - Aiencran 
## 
############################################### 
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. 
##   Please visit http://www.phpbbhacks.com/forums for support. 
############################################### 
## 
############################################### 
##   This hack is released under the GPL License. 
##   This hack can be freely used, but not distributed, without permission. 
##   Intellectual Property is retained by the hack author(s) listed above. 
############################################### 

# 
#-----[ OPEN ]------------------------------------------ 
# 
/language/lang_turkish/lang_admin.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// That's all Folks! 

# 
#-----[ BEFORE, ADD ]------------------------------------ 
# 
$lang['Main_Admin_Undeleted'] = 'Forum Kurucusu silinemez!'; 
$lang['Main_Admin_Unchanged_Profile'] = 'Forum Kurucusunun profilini güncelleyemezsiniz!'; 
$lang['Main_Admin_Unchanged_Level'] = 'Forum Kurucusu sıradan kullanıcı yapılamaz!'; 

# 
# 
#-----[ OPEN ]------------------------------------------ 
# 
/admin/admin_users.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
if( $HTTP_POST_VARS['deleteuser'] ) 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
// 
// Main Admin can't be deleted 
// 
if( $HTTP_POST_VARS['deleteuser'] && $user_id == 2) 
{ 
   message_die(GENERAL_ERROR, $lang['Main_Admin_Undeleted'] ); 
} 
if( $HTTP_POST_VARS['deleteuser'] && $user_id != 2) 

# 
#-----[ FIND ]------------------------------------------ 
# 
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : ''; 

# 
#-----[ BEFORE, ADD ]------------------------------------ 
# 
// 
// Main Admin's profile can't be modified 
// 
if ( $user_id == 2 && $userdata['user_id'] != 2 ) 
{ 
   message_die(GENERAL_ERROR, $lang['Main_Admin_Unchanged_Profile'] ); 
} 

# 
#-----[ OPEN ]------------------------------------------ 
# 
/admin/admin_ug_auth.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// Make admin a user (if already admin) ... ignore if you're trying 
// to change yourself from an admin to user! 
// 
if ( $userdata['user_id'] != $user_id ) 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
// 
// Make admin a user (if already admin) ... ignore if you're trying 
// to change yourself from an admin to user! 
// 
if ( $user_id == 2 ) 
{ 
   message_die(GENERAL_ERROR, $lang['Main_Admin_Unchanged_Level'] ); 
} 
else if ( $userdata['user_id'] != $user_id ) 

# 
#-----[ SAVE & CLOSE ALL FILES ]-------------------------- 
# 
#End
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.