本贴中诉诸的技术,正在本站会员系统中使用。为保护本站用户利益,防止被某些人恶意利用,代码部分仅供部分朋友收看,还请理解。文章源自狐狸影视城-https://fox-studio.net/31002.html
文章源自狐狸影视城-https://fox-studio.net/31002.html
文章源自狐狸影视城-https://fox-studio.net/31002.html
自己改的网站的 VipSystem 会员系统插件,需要配合第三方程序来做接口,实现从支付宝充值,网站自动到账的流程。文章源自狐狸影视城-https://fox-studio.net/31002.html
目前使用的是一个需要 24 小时挂机的软件,在软件中登录支付宝帐号,来监测支付宝页面的交易记录,然后返回值到网站指定的 php 文件中。文章源自狐狸影视城-https://fox-studio.net/31002.html
在这个 php 中进行 MD5 的匹配对比,之后执行网站充值并写入数据库。最后返回判断充值成功或失败的值。文章源自狐狸影视城-https://fox-studio.net/31002.html
以上是这个软件和插件接口的工作流程,下面看看插件中接口文件的 php 源代码。文章源自狐狸影视城-https://fox-studio.net/31002.html
- <?php
- require('../../../wp-config.php' );
- $tradeNo=isset($_POST['tradeNo'])?$_POST['tradeNo']:'';
- $Money=isset($_POST['Money'])?$_POST['Money']:'';
- $title=isset($_POST['title'])?$_POST['title']:'';
- $memo=isset($_POST['memo'])?$_POST['memo']:'';
- $Gateway=isset($_POST['Gateway'])?$_POST['Gateway']:'';
- $Sign=isset($_POST['Sign'])?$_POST['Sign']:'';
- $alipay_account=isset($_POST['alipay_account'])?$_POST['alipay_account']:'';
- $ali_pid=get_option('erphpdown_zhuanid');
- $ali_key=get_option('erphpdown_zhuankey');
- $SignStr=strtoupper(md5($ali_pid.$ali_key.$tradeNo.$Money.$title.$memo));
- if($Sign==$SignStr)
- {
- global $wpdb;
- $checktrade = $wpdb->get_col("select ice_note from wp_ice_money where ice_alipay = '$tradeNo'");
- if($checktrade){exit('success');}
- $userinfo = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_login = '$title' ORDER BY ID");
- if($userinfo)
- {
- $userid = $userinfo[0];
- if(addUserMoney($userid, $Money))
- {
- $sql="INSERT INTO $wpdb->icemoney (ice_money,ice_num,ice_user_id,ice_time,ice_success,ice_note,ice_success_time,ice_alipay)
- VALUES ('$Money','".date("y").mt_rand(10000000,99999999)."','".$userid."','".date("Y-m-d H:i:s")."',1,'8','".date("Y-m-d H:i:s")."','$tradeNo')";
- mysql_query($sql);
- }
- exit('Success');
- }
- else
- {
- exit('IncorrectOrder');
- }
- }
- else
- {
- exit('Fail');
- }
- ?>
源代码没有备注,很难看懂从软件都返回了那些信息。文章源自狐狸影视城-https://fox-studio.net/31002.html
通过打印并写入文件命令,将上方的 $ 所有返回表单数据,全部写入一个指定的文件中。文章源自狐狸影视城-https://fox-studio.net/31002.html
我使用的代码如下:文章源自狐狸影视城-https://fox-studio.net/31002.html
- //数据写入 get.txt 文件中
- $myfile = fopen("get.txt", "w") or die("Unable to open file!");
- $txt ="tradeNo=".$tradeNo."\n";
- fwrite($myfile, $txt);
- $txt ="Money=".$Money."\n";
- fwrite($myfile, $txt);
- $txt ="title=".$title."\n";
- fwrite($myfile, $txt);
- $txt ="memo=".$memo."\n";
- fwrite($myfile, $txt);
- $txt ="Gateway=".$Gateway."\n";
- fwrite($myfile, $txt);
- $txt ="Sign=".$Sign."\n";
- fwrite($myfile, $txt);
- $txt ="alipay_account=".$alipay_account."\n";
- fwrite($myfile, $txt);
- $txt ="ali_pid=".$ali_pid."\n";
- fwrite($myfile, $txt);
- $txt ="ali_key=".$ali_key."\n";
- fwrite($myfile, $txt);
- $txt ="SignStr=".$SignStr."\n";
- fwrite($myfile, $txt);
- fclose($myfile);
代码很机械化,一看就懂了。他会在同目录下创建一个文件,并写入你指定的函数返回值。文章源自狐狸影视城-https://fox-studio.net/31002.html
但是,如果没有充值操作,这些值是不会从软件发送,也就不会有值返回。我使用自己网站的小号登录,并充值 0.01 元的操作。获得如下返回内容:文章源自狐狸影视城-https://fox-studio.net/31002.html
tradeNo=201603192000400111009600316774**文章源自狐狸影视城-https://fox-studio.net/31002.html
Money=.01 文章源自狐狸影视城-https://fox-studio.net/31002.html
title=3081*1336*文章源自狐狸影视城-https://fox-studio.net/31002.html
memo=fox-studio.net 文章源自狐狸影视城-https://fox-studio.net/31002.html
Gateway=alipay 文章源自狐狸影视城-https://fox-studio.net/31002.html
Sign=3B5DD97615FF384D8C0F6E7C0EBF73C*文章源自狐狸影视城-https://fox-studio.net/31002.html
alipay_account=317239773@qq.com 文章源自狐狸影视城-https://fox-studio.net/31002.html
ali_pid=1176*文章源自狐狸影视城-https://fox-studio.net/31002.html
ali_key=0872d097a1d756ea**2e7414569c4c0*文章源自狐狸影视城-https://fox-studio.net/31002.html
SignStr=3B5DD97615FF384D8C0F6E7C0EBF73C*文章源自狐狸影视城-https://fox-studio.net/31002.html
最后再通过代码对比,就很简单的写出了每行代码的功能。也就明白了软件返回了什么样的东西。最后添加上备注的结果如下:文章源自狐狸影视城-https://fox-studio.net/31002.html
其中的文章源自狐狸影视城-https://fox-studio.net/31002.html
- //数据写入 get.txt 文件中
以下的内容为创建写入的文件和从软件中返回的内容。文章源自狐狸影视城-https://fox-studio.net/31002.html
文章源自狐狸影视城-https://fox-studio.net/31002.html
如此,就可以通过一点手段,来做到破解软件的目的。或者你会自己编写程序的话,也就可以自己去做一个软件加 API 接口了!文章源自狐狸影视城-https://fox-studio.net/31002.html
VipSystem 的用户群中,已经有一个朋友和我在研究新的软件,来实现通过转账的方式做到自动充值的目的。并且会作为本插件的内置功能提供使用。当然,我们付出了努力与精力,插件的价格也会有所改变。作为回报作者,以及维护的成本。价格肯定会很便宜。文章源自狐狸影视城-https://fox-studio.net/31002.html
文章源自狐狸影视城-https://fox-studio.net/31002.html
2016 年 3 月 19 日 下午 4:45 1F
进来看看、周末好