花褪残红青杏小。燕子飞时,绿水人家绕。

Z-BlogPHP版本主题/插件的破解方法

Web 十五楼的鸟儿 67913浏览 5评论

目的:推动APP中心健康发展,早点走上正轨。

方法:简单说说,太菜你也搞不定。

文件zb_users\plugin\appcentre\include.php提供了一个官方接口,定义如下:

define('APPCENTRE_API_URL','http://app.zblogcn.com/api/index.php?api=');
define('APPCENTRE_API_APP_ISBUY','isbuy');
//$appid是App在应用中心的发布后的文章ID数字号,非App的ID名称。
function AppCentre_App_Check_ISBUY($appid){
    global $zbp;
    $postdate = array(
        'email'=>$zbp->Config('AppCentre')->shop_username,
        'password'=>$zbp->Config('AppCentre')->shop_password,
        'appid'=>$appid,
        );
    $http_post = Network::Create();
    $http_post->open('POST',APPCENTRE_API_URL.APPCENTRE_API_APP_ISBUY);
    $http_post->setRequestHeader('Referer',substr($zbp->host,0,-1) . $zbp->currenturl);

    $http_post->send($postdate);
    $result = json_decode($http_post->responseText,true);
    return $result;
}

大概就是向API_URL, post一组数据,模拟post的方法很多,不多说可以自己试试。

如果你直接打开API_URL 返回的是这样一组字符串:

{"ret":1,"errcode":2,"msg":"account is not available.","timestamp":1408465790}

其中:

  • ret

字段值含义
ret=0返回正常
ret=1返回错误,具体错误请查看errcode错误代码
  • errcode

字段值内容含义
errcode=00
           
返回正常
           
errcode=1api mothod is wrong.无效接口,接口错误
errcode=2account is not available.帐号错误(空帐号)
errcode=8account verify false.密码错误
           
errcode=9account is not available.帐号错误
           
errcode=11There is no order.订单列表为空
errcode=21This order is not buy of you.订单购买者非本人
errcode=30domain is not in white list.当前插件安装博客地址未在应用中心用户域名白名单内
           
  • data->buy

字段值含义
buy=0用户未购买本插件
buy=1用户已购买本插件


 AppCentre_App_Check_ISBUY这个函数返回值只有两个,buy=0或者1。


你可以有两种方案去绕过验证,一个是删除插件或者主题安装包里的验证函数。


另一个是去修改appcenter这个插件里的api函数,不管买没买都返回1,就行了。

转载请注明:鸟儿博客 » Z-BlogPHP版本主题/插件的破解方法

游客
发表我的评论 换个身份
取消评论

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (5)

  1. 访客
    作者您好,我还是不太了解这个的具体做法,可以加一下我QQ或微信吗?
    QQ26893617767
    微信cjwtmsk
    天马神坑 4年前 (2020-03-05)回复
  2. 访客
    给一下 修改 方法 吧 谢谢
    浪子聖桻❤ 9年前 (2015-09-27)回复