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

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 3247|回复: 59
收起左侧

[其他原创] 配合宝塔实现【夸克】全自动签到获取永久容量

  [复制链接]
xiao1bai2ge3 发表于 2024-3-23 13:07
首先我们需要获取夸克Cookie 教程如下:


需要在电脑浏览器打开夸克网盘,先不登录的情况下 按 F12 ,选择“网络”,如图所示:

image.png

扫码登录后,请选择”
sort?pr=ucpro&fr=pc“名称文件,


并下滑找到”Cookie“所对应的值就是你的Cookie

如下图所示

image.png

执行
PHP文件:把该文件直接放在域名下,通过每天定时访问该文件链接可实现每天自动签到


比如:http://你的域名/sign_task.php

如何在宝塔运用呢?↓





任务类型:选择“访问URL
任务名称随便填写,你自己知道就行。
执行周期:选择“每天”,小时指从第几小时开始;分钟指当前小时的第几分钟。
URL地址:填写可以通过链接直接访问该文件的地址。
填写完后“添加任务”即可实现每天指定几点开始执行签到

image.png


也可以手动点击”执行“文件进行签到

检查是否签到成功,可通过点击”日志“查看,如图:


image.png


sign_task.php代码如下(请注意需要把你的夸克Cookie填写到文件中)

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

$cookie = "填写你的Cookie";

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

if ($stateResponse === FALSE) {
    // 请求失败,输出错误信息
    echo "请求失败,请检查Cookie或网络连接是否正确。\n";
    exit();
}

$response = json_decode($stateResponse, 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" .
                     "Cookie: $cookie\r\n",
        'method'  => 'POST',
        'content' => json_encode($params)
    ]
];
$signResponse = @file_get_contents($signUrl, false, stream_context_create($options));

if ($signResponse === FALSE) {
    // 请求失败,输出错误信息
    echo "签到请求失败,请检查Cookie或网络连接是否正确。\n";
    exit();
}

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

?>
image.png

免费评分

参与人数 10吾爱币 +12 热心值 +9 收起 理由
xnink + 1 用心讨论,共获提升!
祁连涵畅 + 1 + 1 我很赞同!
oBong + 1 谢谢@Thanks!
XiaoBai.Q.Q + 1 谢谢@Thanks!
liyonxin + 1 + 1 谢谢@Thanks!
BYSN5201 + 1 谢谢@Thanks!
苏紫方璇 + 7 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
Duect + 1 谢谢@Thanks!
xsdzgqn + 1 + 1 我很赞同!
creazycar + 1 + 1 用心讨论,共获提升!

查看全部评分

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

qfxldhw 发表于 2024-3-23 16:41
[Python] 纯文本查看 复制代码
import requests
import json

# 替换成你的Cookie
cookie = ""

# 添加User-Agent
user_agent = ""

# 检查当前签到状态
state_url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/info?pr=ucpro&fr=pc&uc_param_str="
headers = {
    "Cookie": cookie,
    "User-Agent": user_agent  
}
try:
    state_response = requests.get(state_url, headers=headers)
    state_response.raise_for_status()  # 检查请求是否成功
except requests.RequestException as e:
    print("请求失败,请检查Cookie或网络连接是否正确。")
    print(e)
    exit()

response = state_response.json()
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,
    "User-Agent": user_agent 
}
try:
    sign_response = requests.post(sign_url, headers=headers, json=params)
    sign_response.raise_for_status()
except requests.RequestException as e:
    print("签到请求失败,请检查Cookie或网络连接是否正确。")
    print(e)
    exit()

data_response = sign_response.json()
mb = data_response["data"]["sign_daily_reward"] / 2048
print(json.dumps(data_response, ensure_ascii=False))
print(f"签到成功,获取到{mb}MB!")
  改成Python了

免费评分

参与人数 3吾爱币 +3 热心值 +3 收起 理由
winic57 + 1 File &amp;quot;/ql/data/scripts/sign_task.py&amp;quot;, line 5;SyntaxError: in
Cloucky + 1 + 1 谢谢@Thanks!
tianya0908 + 2 + 1 感谢分享!!!

查看全部评分

ding2548 发表于 2024-3-23 15:41
鹏路翱翔 发表于 2024-3-23 15:23
yuiboke 发表于 2024-3-23 15:46
还有这活动
wddpyy 发表于 2024-3-23 15:53
感谢分享!!!
流浪情人 发表于 2024-3-23 16:13
z这个解放了双手,有时候自己也会忘了签到
yinxingzhe55 发表于 2024-3-23 16:14
6,拿去白嫖了,谢谢分享
linzhiye 发表于 2024-3-23 16:23
感谢分享!!!
SineL 发表于 2024-3-23 16:45
感谢!刚好需要
您需要登录后才可以回帖 登录 | 注册[Register]

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

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

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

GMT+8, 2024-4-27 18:11

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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