首页 开发编程 正文

php 怎么解密(求高手php代码解密)

error_reporting(0);}if((count($_POST)>=1||count($_GET)>=1)&="/taodi/admin/index.php"){}require_once"../include/application.php";require_once'../include/sysfun...

求高手php代码解密?

error_reporting(0); if(!isset($_SESSION)){ session_start(); } if((count($_POST)>=1 ||count($_GET)>=1 ) && $_SERVER['SCRIPT_NAME']!="/taodi/admin/index.php"){ } require_once "../include/application.php"; require_once "../data/configdata.php"; require_once '../include/Taoapi_Util.php'; require_once '../include/sysfunction.php'; if(!is_writable(ROOT."configdata.php")){ exit("<script language='JavaScript'>alert('后台配置文件没有写入权限!请咨询空间商或者进入空间管理面板修改!');history.go(-1);</script>"); } ;

数据库用户名和密码在哪里配置的?

服务器的数据库的密码在include文件夹下的conn.inc文件中配置,也就是你phpmywind的时候的用户名密码数据库名什么的都在这里可以找到,不过如果加密过的话要想办法解密。

怎么给URL加密?

php有mcrypt库,但是本人用下来很烂,加密在解密字符串会多出很多原来没有的字符,而且总是乱码,差不多只有sha1是比较好用的用哈希加密非常简单Location('music.php?url='.sha1($_GET['url']));

PHP加密了怎么解出来?

这个应该是gzip压缩。用个解压缩的就行。function gzip_decode ($data) {$flags = ord(substr($data, 3,

1));$headerlen = 10;$extralen = 0;$filenamelen = 0;if ($flags & 4) {$extralen = unpack('v' ,substr($data, 10,

2));$extralen = $extralen[1];$headerlen += 2 + $extralen;}if ($flags & 8) // Filename$headerlen = strpos($data, chr(0), $headerlen) + 1;if ($flags & 16) // Comment$headerlen = strpos($data, chr(0), $headerlen) + 1;if ($flags & 2) // CRC at end of file$headerlen += 2;$unpacked = @gzinflate(substr($data, $headerlen));if ($unpacked === FALSE)$unpacked = $data;return $unpacked;}

如何给PHP源码加密?

base64 可加可解。 md5 不可解 2种PHP的源码加密方式,此加密方法支持任意PHP版。 注意,加密后的PHP代码无需第三方工具解密,像往常一样,直接运行即可。 复制代码 代码如下: '); $contents = substr($contents, $headerPos + 5, $footerPos $headerPos);$encode = base64_encode(gzdeflate($contents)); // 开始编码$encode = '";return file_put_contents($filename, $encode);} return false; } //调用函数 $filename = 'dam.php'; encode_file_contents($filename); echo "OK,加密完成!" ?> 加密方式2: 复制代码 代码如下: \'.$'.$q1.'($'.$q3.'($'.$q4.'($'.$q2.',$'.$q5.'*2),$'.$q4.'($'.$q2.',$'.$q5.',$'.$q5.'),$'.$q4.'($'.$q2.',0,$'.$q5.'))));').'"));';$s = ''; //echo $s; // 生成 加密后的PHP文件 $fpp1 = fopen('temp_'.$filename, 'w'); fwrite($fpp1, $s) or die('写文件错误'); ?> 其实,PHP加密源码方式有很多,譬如,免费的微盾PHP加密,还有 www.phpjm.net 搞的在线加密,只是phpjm更复杂点而已。 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++另外,分享一个 PHP类,它能对 文本的内容进行 二进制加密 与 解密,代码如下: 复制代码 代码如下: setIter(32); } function setIter($n_iter) { $this->n_iter = $n_iter; } function getIter() { return $this->n_iter; } function encrypt($data, $key) { $n = $this->_resize($data, 4); $data_long[0] = $n; $n_data_long = $this->_str2long(1, $data, $data_long);$n = count($data_long); if (($n & 1) == 1) { $data_long[$n] = chr(0); $n_data_long++; } $this->_resize($key, 16, true); if ( '' == $key ) $key = '0000000000000000'; $n_key_long = $this->_str2long(0, $key, $key_long);$enc_data = ''; $w = array(0, 0); $j = 0; $k = array(0, 0, 0, 0); for ($i = 0; $i _encipherLong($data_long[$i], $data_long[++$i], $w, $k);$enc_data .= $this->_long2str($w[0]); $enc_data .= $this->_long2str($w[1]); } return $enc_data; } function decrypt($enc_data, $key) { $n_enc_data_long = $this->_str2long(0, $enc_data, $enc_data_long);$this->_resize($key, 16, true); if ( '' == $key ) $key = '0000000000000000'; $n_key_long = $this->_str2long(0, $key, $key_long);$data = ''; $w = array(0, 0); $j = 0; $len = 0; $k = array(0, 0, 0, 0); $pos = 0; for ($i = 0; $i _decipherLong($enc_data_long[$i], $enc_data_long[$i + 1], $w, $k);if (0 == $i) { $len = $w[0]; if (4 _long2str($w[1]); } else { $data .= substr($this->_long2str($w[1]), 0, $len % 4);} } else { $pos = ($i 1) * 4; if ($pos + 4 _long2str($w[0]); if ($pos + 8 _long2str($w[1]); } elseif ($pos + 4 _long2str($w[1]), 0, $len % 4);} } else { $data .= substr($this->_long2str($w[0]), 0, $len % 4);} } } return $data; } function _encipherLong($y, $z, &$w, &$k) { $sum = (integer) 0; $delta = 0x9E3779B9; $n = (integer) $this->n_iter; while ($n-> 0) { $y = $this->_add($y, $this->_add($z _rshift($z, 5), $z) ^$this->_add($sum, $k[$sum & 3])); $sum = $this->_add($sum, $delta); $z = $this->_add($z, $this->_add($y _rshift($y, 5), $y) ^$this->_add($sum, $k[$this->_rshift($sum, 11) & 3]));} $w[0] = $y; $w[1] = $z; } function _decipherLong($y, $z, &$w, &$k) { $sum = 0xC6EF3720; $delta = 0x9E3779B9; $n = (integer) $this->n_iter; while ($n-> 0) { $z = $this->_add($z, -($this->_add($y _rshift($y, 5), $y) ^$this->_add($sum, $k[$this->_rshift($sum, 11) & 3])));$sum = $this->_add($sum, -$delta); $y = $this->_add($y, -($this->_add($z _rshift($z, 5), $z) ^$this->_add($sum, $k[$sum & 3]))); } $w[0] = $y; $w[1] = $z; } function _resize(&$data, $size, $nonull = false){ $n = strlen($data); $nmod = $n % $size; if ( 0 == $nmod ) $nmod = $size; if ($nmod > 0) { if ($nonull) { for ($i = $n; $i $integer) {$integer = fmod($integer, 0xffffffff + 1);} if (0x7fffffff $integer) { $integer += 0xffffffff + 1.0; } if (0 > $integer) { $integer &= 0x7fffffff; $integer >>= $n; $integer |= 1 >= $n; } return $integer; } function _add($i1, $i2) { $result = 0.0; foreach (func_get_args() as $value) { if (0.0 > $value) { $value -= 1.0 + 0xffffffff; } $result += $value; } if (0xffffffff $result) {$result = fmod($result, 0xffffffff + 1); } if (0x7fffffff $result) { $result += 0xffffffff + 1.0; } return $result; } } ?> 使用方法参考如下: // 加密过程 view sourceprint? $text_file = S_ROOT . './456.php'; $str = @file_get_contents($text_file); require_once S_ROOT . "./text_auth.php"; $text_auth = new text_auth(64); $str = $text_auth->encrypt($str, "qianyunlai.com");$filename = S_ROOT . './789.php'; // 加密后的文本为二进制,普通的文本编辑器无法正常查看file_put_contents($filename, $str); // 解密过程 view sourceprint ?01 $text_file = S_ROOT . './789.php'; $str = @file_get_contents($text_file); require_once S_ROOT . "./text_auth.php"; $text_auth = new text_auth(64); $str = $text_auth->decrypt($str, "qianyunlai.com");$filename = S_ROOT . './456.php'; file_put_contents($filename, $str);

本文转载自互联网,如有侵权,联系删除