吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1554|回复: 44
收起左侧

[其他原创] 夸克网盘签到php版本

  [复制链接]
xiao1bai2ge3 发表于 2024-3-22 17:06
本帖最后由 xiao1bai2ge3 于 2024-3-23 13:29 编辑

感谢技术支持:rabbit0214

html代码php代码放入到域名目录下
通过访问html页面,填写“cookie”进行签到


html代码
[HTML] 纯文本查看 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>云盘签到</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        .container {
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            text-align: center;
        }
        form {
            text-align: center;
        }
        label {
            font-weight: bold;
        }
        input[type="text"] {
            width: 80%;
            padding: 8px;
            margin: 10px 0;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }
        button[type="submit"] {
            background-color: #4CAF50;
            color: white;
            padding: 10px 20px;
            margin: 10px 0;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button[type="submit"]:hover {
            background-color: #45a049;
        }
    </style>
    <script>
        function submitForm() {
            var formData = new FormData(document.getElementById("signInForm"));

            var xhr = new XMLHttpRequest();
            xhr.open("POST", "sign.php", true);
            xhr.onload = function () {
                if (xhr.status == 200) {
                    alert(xhr.responseText);
                } else {
                    alert("Error: " + xhr.status);
                }
            };
            xhr.send(formData);
            return false; // Prevent default form submission
        }
    </script>
</head>
<body>
    <div class="container">
        <h1>云盘签到</h1>
        <form id="signInForm">
            <label for="cookie">输入Cookie:</label><br>
            <input type="text" id="cookie" name="cookie" required><br>
            <button type="submit">签到</button>
        </form>
    </div>
</body>
</html>


php代码
[PHP] 纯文本查看 复制代码
<?php

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $cookie = $_POST["cookie"];

    // 获取用户信息
    $userUrl = "https://pan.quark.cn/account/info";
    $userInfo = json_decode(file_get_contents($userUrl, false, stream_context_create([
        'http' => [
            'header' => "Cookie: $cookie\r\n"
        ]
    ])), true)["data"];

    if (!$userInfo["nickname"]) {
        echo "登录失败,cookie错误。\n";
        exit();
    }

    echo "hello, {$userInfo['nickname']}! 登录成功。\n";

    // 查看当前签到状态
    $stateUrl = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/info?pr=ucpro&fr=pc&uc_param_str=";
    $response = json_decode(file_get_contents($stateUrl, false, stream_context_create([
        'http' => [
            'header' => "Cookie: $cookie\r\n"
        ]
    ])), true);
    $sign = $response["data"]["cap_sign"];

    if ($sign["sign_daily"]) {
        $number = $sign["sign_daily_reward"] / (1024 * 1024);
        $progress = bcdiv($sign["sign_progress"], $sign["sign_target"], 4) * 100;
        echo "今日已签到获取{$number}MB,进度{$progress}%\n";
        exit();
    }

    // 执行签到
    $signUrl = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign?pr=ucpro&fr=pc&uc_param_str=";
    $params = [
        "sign_cyclic" => true
    ];
    $options = [
        'http' => [
            'header'  => "Content-Type: application/json\r\n",
            'method'  => 'POST',
            'content' => json_encode($params)
        ]
    ];
    $dataResponse = json_decode(file_get_contents($signUrl, false, stream_context_create($options)), true);

    if (isset($dataResponse["error_code"])) { 
        echo "签到失败,请检查cookie是否正常或过期,错误代码: {$dataResponse['error_code']}\n";
        exit(); }

    $mb = $dataResponse["data"]["sign_daily_reward"] / 2048;
    echo json_encode($dataResponse) . "\n";
    echo "签到成功,获取到{$mb}MB!\n";
}
?>

免费评分

参与人数 7吾爱币 +13 热心值 +6 收起 理由
xnink + 1 热心回复!
Jason19821220 + 1 + 1 谢谢@Thanks!
哎我了个去 + 2 + 1 鼓励转贴优秀软件安全工具和文档!
yuzaizi521 + 1 + 1 谢谢@Thanks!
苏紫方璇 + 7 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
wojiaoxiaoqi + 1 + 1 我很赞同!
lujian666 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

NOOB 发表于 2024-3-22 23:08
感谢楼主,不过不会用。在本地创建了php跟html,没返回结果。然后我用gpt改成python,放到青龙测试可用
[Python] 纯文本查看 复制代码
import json
import urllib.request

if __name__ == "__main__":
    cookie = "这里填写自己的cookie"

    # 获取用户信息
    user_url = "https://pan.quark.cn/account/info"
    user_info = json.loads(urllib.request.urlopen(urllib.request.Request(user_url, headers={'Cookie': cookie})).read().decode())["data"]

    if not user_info["nickname"]:
        print("登录失败,Cookie错误。")
        exit()

    print(f"Hello, {user_info['nickname']}! 登录成功。")

    # 查看当前签到状态
    state_url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/info?pr=ucpro&fr=pc&uc_param_str="
    response = json.loads(urllib.request.urlopen(urllib.request.Request(state_url, headers={'Cookie': cookie})).read().decode())
    sign = response["data"]["cap_sign"]

    if sign["sign_daily"]:
        number = sign["sign_daily_reward"] / (1024 * 1024)
        progress = sign["sign_progress"] / sign["sign_target"] * 100
        print(f"今日已签到获取{number}MB,进度{progress}%")
        exit()

    # 执行签到
    sign_url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign?pr=ucpro&fr=pc&uc_param_str="
    params = {"sign_cyclic": True}
    headers = {"Content-Type": "application/json", "Cookie": cookie}
    req = urllib.request.Request(sign_url, json.dumps(params).encode(), headers)
    with urllib.request.urlopen(req) as response:
        data_response = json.loads(response.read().decode())
        mb = data_response["data"]["sign_daily_reward"] / 2048
        print(json.dumps(data_response))
        print(f"签到成功,获取到{mb}MB!")
北风_ 发表于 2024-3-22 17:51
anorith 发表于 2024-3-22 17:55
有了这个签到就不怕忘记了,有时忘记签到导致断签就很难受
Kuangsi 发表于 2024-3-22 18:20
有阿里网盘和百度网盘的合集签到吗??
寒冰飞雪 发表于 2024-3-22 18:55
天翼云盘来一个
KongMen 发表于 2024-3-22 19:01
好好好好好好
liu0356 发表于 2024-3-22 19:35
有时间试一下,谢谢
MUlanzi 发表于 2024-3-22 19:39
夸克容量小了点儿
z12y251985 发表于 2024-3-22 19:44
总有很多小工具感谢分享
qskj 发表于 2024-3-22 19:58
这个好,这具肿么用
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-4-27 15:57

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表