请教php加密问题
- 提问者网友:王者佥
- 2021-03-05 06:45
http://pan.baidu.com/s/1mgmigBm 这是那个文件,这里面有一个加密文件,大神破解了,请发邮箱seven7749# qq.com(#是@),或直接上传到知道里,告知破解方法、步骤最佳,先谢谢了。
- 五星知识达人网友:英雄的欲望
- 2021-03-05 08:14
final class System {
public static function &load_sys_class($class_name = '', $module = 'sys', $new = 'yes') {
static $classes = array();
$path = self::load_class_file_name($class_name, $module);
$key = md5($class_name . $path . $new);
if (isset($classes[$key])) {
return $classes[$key];
}
if (file_exists($path)) {
include_once $path;
if ($new == 'yes') {
$classes[$key] = new $class_name;
} else {
$classes[$key] = true;
}
return $classes[$key];
} else {
_error('load system class file: ' . $module . " / " . $class_name, 'The file does not exist');
}
}
public static function &load_app_class($class_name = '', $module = '', $new = 'yes') {
if (empty($module)) {
$module = ROUTE_M;
}
return self::load_sys_class($class_name, $module, $new);
}
public static function load_class_file_name($class_name = '', $module = 'sys') {
static $filename = array();
if (isset($filename[$module . $class_name])) return $filename[$module . $class_name];
if ($module == 'sys') {
$filename[$module . $class_name] = G_SYSTEM . 'libs' . DIRECTORY_SEPARATOR . $class_name . '.class.php';
} else if ($module != 'sys') {
$filename[$module . $class_name] = G_SYSTEM . 'modules' . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . "lib" . DIRECTORY_SEPARATOR . $class_name . '.class.php';
} else {
return $filename[$module . $class_name];
}
return $filename[$module . $class_name];
}
public static function load_sys_config($filename, $keys = '') {
static $configs = array();
if (isset($configs[$filename])) {
if (empty($keys)) {
return $configs[$filename];
} else if (isset($configs[$filename][$keys])) {
return $configs[$filename][$keys];
} else {
return $configs[$filename];
}
}
if (file_exists(G_CONFIG . $filename . '.inc.php')) {
$configs[$filename] = include G_CONFIG . $filename . '.inc.php';
if (empty($keys)) {
return $configs[$filename];
} else {
return $configs[$filename][$keys];
}
}
_error('load system config file: ' . $filename, 'The file does not exist+');
}
public static function load_app_config($filename, $keys = '', $module = '') {
static $configs = array();
if (isset($configs[$filename])) {
if (empty($keys)) {
return $configs[$filename];
} else if (isset($configs[$filename][$keys])) {
return $configs[$filename][$keys];
} else {
return $configs[$filename];
}
}
if (empty($module)) $module = ROUTE_M;
$path = G_SYSTEM . 'modules' . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $filename . '.ini.php';
if (file_exists($path)) {
$configs[$filename] = include $path;
if (empty($keys)) {
return $configs[$filename];
} else {
return $configs[$filename][$keys];
}
}
_error('load app config file: ' . $module . " / " . $filename, 'The file does not exist');
}
public static function load_sys_fun($fun_name) {
static $funcs = array();
$path = G_SYSTEM . 'funcs' . DIRECTORY_SEPARATOR . $fun_name . '.fun.php';
$key = md5($path);
if (isset($funcs[$key])) return true;
if (file_exists($path)) {
$funcs[$key] = true;
return include $path;
} else {
$funcs[$key] = false;
_error('load system function file: ' . $fun_name, 'The file does not exist');
}
}
public static function load_app_fun($fun_name, $module = null) {
static $funcs = array();
if (empty($module)) {
$module = ROUTE_M;
}
$path = G_SYSTEM . 'modules' . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . $fun_name . '.fun.php';
$key = md5($path);
if (isset($funcs[$key])) return true;
if (file_exists($path)) {
$funcs[$key] = true;
return include $path;
} else {
_error('load app function file: ' . $module . " / " . $fun_name, 'The file does not exist');
}
}
public static function &load_app_model($model_name = '', $module = '', $new = 'yes') {
static $models = array();
if (empty($module)) {
$module = ROUTE_M;
}
$key = md5($module . $model_name . $new);
if (isset($models[$key])) {
return $models[$key];
}
$path = G_SYSTEM . 'modules' . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . $model_name . '.model.php';
if (file_exists($path)) {
include $path;
if ($new == 'yes') {
$models[$key] = new $model_name;
} else if ($new == 'no') {
$models[$key] = true;
}
return $models[$key];
}
_error('load app model file: ' . $module . " / " . $model_name, 'The file does not exist');
}
public static function CreateApp() {
return self::load_sys_class('application');
}
}
?>
另外给出程序中域名限制的代码
while(((isset($HTTP_SERVER_VARS['SERVER_NAME']))&&(!eregi('((.*\.)?rrhy\.net)|((\.*\\.)?127\.0\.0\.1)',$HTTP_SERVER_VARS['SERVER_NAME'])))||((isset($_SERVER['HTTP_HOST']))&&(!eregi('((.*\.)?rrhy\.net)|((\.*\\.)?127\.0\.0\.1)',$_SERVER['HTTP_HOST']))))
die('You visit the domain name without authorization:www.koomao.com ');
$OO00O00O0=str_replace('__FILE__',"'".'system.class.php'."'",(base64_decode(strtr(fread($fp,5560),'EnteryouwkhRHYKNWOUTAaBbCcDdFfGgIiJjLlMmPpQqSsVvXxZz0123456789+/=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'))));fclose($fp);
- 1楼网友:污到你湿
- 2021-03-05 08:55
<?php function phpencode($code) { $code = str_replace(array('<?php','?>','<?php'),array('','',''),$code); $encode = base64_encode(gzdeflate($code));// 开始编码 $encode = '<?php'."\neval(gzinflate(base64_decode("."'".$encode."'".")));\n?>"; return $encode; } function phpdecode($code) { $code = str_replace(array('<?php','<?php',"eval(gzinflate(base64_decode('","')));",'?>'),array
('','','','','',''),$code); $decode = base64_decode($code); $decode = @gzinflate($decode); return $decode; } ?> <!doctype html> <html lang="zh-cn"> <meta charset="utf-8"> <title>php加密/解密</title> <link rel="alternate" title=" " href=" http://feeds.feedburner.com/feeds/rss"
type="application/rss+xml" /> <style type="text/css" media="all"> html, body {margin: 0;padding: 0; }body {color: #333;font: 12px tahoma,lucida grande, sans-
serif;margin: 9%;}a {color: #0055cc; }img {border: 0px solid #ccc;}h1 {margin: 0;}h3 {color:
#555;font-size: 1.6em;font-weight: normal;margin: 0; }pre {color: #0055cc;font-size: 1.1em;line-
height: 1.2;margin: 0.25em 0; }p {margin: 0.65em 0;}#ads {border-left: 1px solid #eee;float:
right;margin: 0 0 2em 2.5em;padding-left: 3px;width: 160px;}#source {margin-bottom: 2.5em; }pre
{overflow: auto;padding:1em 0; }h2 {position: relative;top: 0.5em;} </style> <h3>php加密/解密</h3> <form method="post"> <textarea name="source" cols="55" rows="8"> <?php if(!empty($_post['source'])) { if($_post['button']=='加密') { echo htmlspecialchars(phpencode(stripcslashes($_post['source']))); } if($_post['button']=='解密') { echo htmlspecialchars(phpdecode(stripcslashes($_post['source']))); } } ?> </textarea> <?php if(!empty($_post['source'])){ if($_post['button']=='加密') { echo '<br /><br />加密成功.'; } if($_post['button']=='解密') { echo '<br /><br />解密成功.'; } }else{ echo '<br /><br />利用 base64+gzinflate 对您的php代码进行压缩,可以一定程度上保护您的代码版权和减小
代码的体积。'; } ?> <br /><br /> <input type="submit" name="button" value="加密"> <input type="submit" name="button" value="解密"> </form>