小鬼EP分销系统2.7版本全解去授权破解版+修复QQ登录+接口状态改为本地检测

更新内容

1.监控用户接口显示到期时间

2.增加接口到期禁止开通主机功能

3.key安全码后台隐藏

4.增加了一套layui模板

5.添加用户列表搜索功能

6.添加主机列表搜索功能

7.修复站长后台登入不跳转

8.修复api对接开通ssl

9.修复api ssl加密传输功能

10.增加两套首页模板 站长可在后台更换模板

11.接口状态改为本地检测

12.修复QQ登录

小鬼EP分销系统2.7版本全解去授权破解版+修复QQ登录+接口状态改为本地检测

QQ登录修复,修改/includes/function.php 文件32行

HTTPS://qqlogin.vience.cn/Oauth/request.api?state=

小鬼EP分销系统2.7版本全解去授权破解版+修复QQ登录+接口状态改为本地检测

接口状态监测改为本地检测

 /includes/function.php  25-26行 引用api.php 121-130行 引用如下:

PHP

复制

if($act == 'apistatus'){
$ip = $_REQUEST['ip'];
$key = $_REQUEST['key'];
$url = $_REQUEST['url'];
$r = rand(100,999);
$a = 'add';
$s = md5($a . $key . $r);
$api = "http://{$ip}:3312/api/index.php?c=whm&a={$a}&r={$r}&s={$s}&json=1";
$result = curl_get($api);
if(($result === false) || strpos($result ,'403')){
$code = 0;
}else{
$code = 1;
}
echo json_encode(array(
'code' => $code
));
exit();
}

includes/common.php文件展示

PHP

复制

<?php
header('Content-type:text/html;Charset=utf-8');
define('VERSION', '2.7s');
define('AUTH_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('AUTH_API_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/api.php');
define('DEC', DIRECTORY_SEPARATOR);
// 系统分隔符
define('ROOT_PATH', str_replace(strrchr(__DIR__, DEC), '', __DIR__) . DEC);
// 根目录
define('INCLUDES_PATH', __DIR__ . DEC);
// 引入目录
define('INSTALL_PATH', ROOT_PATH . 'install' . DEC);
// 安装目录
$isLogin = false;
$isUserLogin = false;
$mod = isset($mod) ? $mod : '';
require_once INCLUDES_PATH . 'function.php';
require_once INCLUDES_PATH . 'common.class.php';
require_once ROOT_PATH . 'config.php';
require_once INCLUDES_PATH . 'epay.class.php';
require_once INCLUDES_PATH . 'codepay.class.php';
if (phpversion() != 5.6) {
    Tips::error('要求PHP版本5.6');
}
if (!file_exists(INSTALL_PATH . 'install.lock') && $mod != 'install') {
    Tips::error('请先安装!', '/install');
}
if ($mod != 'install') {
    $dsn = 'MySQL:host=' . $db['dbHost'] . ';port=' . $db['dbPort'] . ';dbname=' . $db['dbName'] . ';charset=utf8';
    try {
        $DB = new PDO($dsn, $db['dbUser'], $db['dbPwd']);
    } catch (Exception $e) {
        Tips::error('数据库连接错误,请检查根目录 config.php 文件');
    }
    $allDb = $DB->query('show tables')->fetchAll(PDO::FETCH_ASSOC);
    if (empty($allDb)) {
        unlink(INSTALL_PATH . 'install.lock');
        if ($mod != 'install') {
            Tips::error('数据库为空,请重新安装!', '/install');
        }
    }
}
if ($mod == 'install' && file_exists(INSTALL_PATH . 'install.lock')) {
    Tips::error('已安装,重新安装请删除 /install/install.lock 文件', '/');
}
session_start();
if ($mod != 'install') {
    if (isset($_SESSION['adminUser'])) {
        $adminUser = $_SESSION['adminUser'];
        $ip = Gets::ip();
        $version = json_decode(file_get_contents(AUTH_API_URL . '?act=version'), true);
        $adminData = $DB->query("SELECT * FROM `impepd_admin` WHERE `adminUser` = '{$adminUser}'")->fetch(PDO::FETCH_ASSOC);
        if (!empty($adminData) && $adminData['adminLoginIp'] == $ip) {
            $isLogin = true;
        }
    }
    if (!isset($notLogin) && $mod == 'admin' && !$isLogin) {
        header('Location:/admin/login.php');
    }
    if (isset($_SESSION['userName'])) {
        $userName = $_SESSION['userName'];
        $ip = Gets::ip();
        $userData = $DB->query("SELECT * FROM `impepd_user` WHERE `userName` = '{$userName}'")->fetch(PDO::FETCH_ASSOC);
        if (!empty($userData) && $userData['userIp'] == $ip && $userData['userState'] == 1) {
            $isUserLogin = true;
        }
    }
    if (!isset($notLogin) && $mod == 'user' && !$isUserLogin) {
        header('Location:/user/login.php');
    }
    $confData = $DB->query('SELECT * FROM `impepd_config`')->fetchAll(PDO::FETCH_ASSOC);
    foreach ($confData as $value) {
        $conf[$value['k']] = $value['v'];
    }
}

vendor/IMPEPD/IMPEPD.php 文件展示

PHP

复制

<?php
function IMPEPD_ConfigOptions()
{
return array(
'空间大小' => array('Type' => 'text','Size' => '5','Description' => 'MB'),
'数据库大小' => array('Type' => 'text','Size' => '5','Description' => 'MB'),
'绑定域名数' => array('Type' => 'text','Size' => '5','Description' => '个,-1为无限'),
'绑定子目录数' => array('Type' => 'text','Size' => '5','Description' => '个,0为无限'),
'流量限制' => array('Type' => 'text','Size' => '5','Description' => 'GB/月'),
'产品类型' => array('Type' => 'text','Size' => '5','Description' => '0为虚拟主机,1为CDN'),
'端口(可留空)' => array('Type' => 'text','Size' => '5','Description' => '多个端口由,分开,ssl端口请加s,如80,443s')
);
}
function IMPEPD_AdminLink($params)
{
    $act = 'AdminLink';
    $data = array(
        'apiUrl' => isset($params['product_id']) ? $params['serverdomain'] : $params['serverhostname'],
        'userName' => $params['serverusername'],
        'userKey' => $params['serverpassword']
    );
    $result = GetCloud($act, $data);
    $str = '<span class="btn btn-success btn-xs">' . $result['msg'] . '</span>';
    if($result['code'] != 1)$str = '<span class="btn btn-danger btn-xs">' . $result['msg'] . '</span>';
    return $str;
}
function IMPEPD_CheckName($params)
{
if (!preg_match('/^[a-z0-9][a-z0-9_]{3,16}$/', $params['username']))return 'failed';
return 'success';
}
function IMPEPD_ClientArea($params)
{
if(isset($params['configoption25'])){
$str1 = '<ui><form action="http://' . $params["serverip"] . ':3312/vhost/index.php?c=session&a=login" method="post" target="_blank"><input type="hidden" name="username" value="' . $params['username'] . '" /><input type="hidden" name="passwd" value="' . $params['password'] . '" /><input type="submit" class="btn btn-success btn-block" value="直接登录(自定义密码无效)"/></form>';
$str2 = '<a href="http://' . $params["serverip"] . ':3312/vhost/?c=session&a=login" target="_blank" class="btn btn-primary btn-block">打开登录地址</a>';
return array($str1, $str2);
} else {
$str = '<body onLoad="document.impepd.submit()"><form action="http://' . $params['serverip'] . ':3312/vhost/?c=session&a=login" method="POST" name="impepd"><input name="username" value="' . $params['username'] . '" hidden><input name="passwd" value="' . $params['password'] . '" hidden></form></body>';
exit($str);
}
}
function IMPEPD_CreateAccount($params)
{
    if (!$params['configoption6'] && ($params['configoption1'] == NULL || $params['configoption2'] == NULL)) return '容量设置错误';
    $act = 'CreateAccount';
    $data = array(
        'apiUrl' => isset($params['product_id']) ? $params['serverdomain'] : $params['serverhostname'],
        'userName' => $params['serverusername'],
        "userKey" => $params['serverpassword'],
        'apiIp' => $params['serverip'],
        'hostName' => $params['username'],
        'hostPwd' => $params['password'],
        'hostDomain' => $params['domain'],
        'hostLimit' => $params['configoption1'],
        'dbLimit' => $params['configoption2'],
        'domainLimit' => $params['configoption3'],
        'dirLimit' => $params['configoption4'],
        'flowLimit' => $params['configoption5'],
        'hostType' => $params['configoption6'],
        'prot' => $params['configoption7']
    );
    $result = GetCloud($act, $data);
    $str = 'success';
    if(isset($params['configoption25']))$str = '成功';
    if($result['code'] != 1)$str = $result['msg'];
    return $str;
}
function IMPEPD_ChangePassword($params)
{
    $act = 'ChangePassword';
    $data = array(
        'apiUrl' => isset($params['product_id']) ? $params['serverdomain'] : $params['serverhostname'],
        'userName' => $params['serverusername'],
        "userKey" => $params['serverpassword'],
        'apiIp' => $params['serverip'],
        'hostName' => $params['username']
    );
    $result = GetCloud($act, $data);
    $str = 'success';
    if(isset($params['configoption25']))$str = '成功';
    if($result['code'] != 1)$str = $result['msg'];
    return $str;
}
function IMPEPD_TerminateAccount($params)
{
    $act = 'TerminateAccount';
    $data = array(
        'apiUrl' => isset($params['product_id']) ? $params['serverdomain'] : $params['serverhostname'],
        'userName' => $params['serverusername'],
        "userKey" => $params['serverpassword'],
        'apiIp' => $params['serverip'],
        'hostName' => $params['username']
    );
    $result = GetCloud($act, $data);
    $str = 'success';
    if(isset($params['configoption25']))$str = '成功';
    if($result['code'] != 1)$str = $result['msg'];
    return $str;
}
function IMPEPD_SuspendAccount($params)
{
    $act = 'SuspendAccount';
    $data = array(
        'apiUrl' => isset($params['product_id']) ? $params['serverdomain'] : $params['serverhostname'],
        'userName' => $params['serverusername'],
        "userKey" => $params['serverpassword'],
        'apiIp' => $params['serverip'],
        'hostName' => $params['username'],
        'hostState' => 1
    );
    $result = GetCloud($act, $data);
    $str = 'success';
    if(isset($params['configoption25']))$str = '成功';
    if($result['code'] != 1)$str = $result['msg'];
    return $str;
}
function IMPEPD_UnsuspendAccount($params)
{
    $act = 'SuspendAccount';
    $data = array(
        'apiUrl' => isset($params['product_id']) ? $params['serverdomain'] : $params['serverhostname'],
        'userName' => $params['serverusername'],
        "userKey" => $params['serverpassword'],
        'apiIp' => $params['serverip'],
        'hostName' => $params['username'],
        'hostState' => 0
    );
    $result = GetCloud($act, $data);
    $str = 'success';
    if(isset($params['configoption25']))$str = '成功';
    if($result['code'] != 1)$str = $result['msg'];
    return $str;
}
function GetCloud($act, $data){
    $apiUrl = $data['apiUrl'];
    unset($data['apiUrl']);
    $url = $apiUrl . '?act=' . $act;
    foreach ($data as $k => $v) {
        $url .= '&' . $k . '=' . $v;
    }
    return json_decode(file_get_contents($url), TRUE);
}
?>

PS:文件仅供学习参考,请勿商用!

文件下载

附件:小鬼ep分销系统

文件大小:3.2M

更新时间:2020.04.07

本站大部分下载资源收集于网络,只做学习和交流使用,版权归原作者所有,若为付费资源,请在下载后24小时之内自觉删除,若作商业用途,请到原网站购买,由于未及时购买和付费发生的侵权行为,与本站无关。本站发布的内容若侵犯到您的权益,请联系本站删除,我们将及时处理!

未经允许不得转载:作者:admin, 转载或复制请以 超链接形式 并注明出处 夜河资源网
原文地址:《小鬼EP分销系统2.7版本全解去授权破解版+修复QQ登录+接口状态改为本地检测》 发布于2020-04-07

赞(0) 打赏

评论 抢沙发

7 + 1 =


撰写不易~如果您觉得文章对您有帮助的话可以打赏我哦~谢谢亲亲~

支付宝扫一扫打赏

微信扫一扫打赏

十一款外服网游加速器
可加速GTA5、彩虹六号、绝地求生等所有外服游戏平台(steam、Ubi、Epic等)游戏。
切换注册

登录

忘记密码 ?

切换登录

注册