吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 428|回复: 9
上一主题 下一主题
收起左侧

[其他原创] 第九届全国学生宪法小卫士PHP网页端在线一秒完成~

[复制链接]
跳转到指定楼层
楼主
SVIP9大会员 发表于 2024-10-22 18:10 回帖奖励
本帖最后由 SVIP9大会员 于 2024-10-22 18:29 编辑

前言:

第九届全国学生宪法小卫士登录地址如下:

登录地址:https://static.qspfw.moe.gov.cn/user/#/user/login?backUrl=http%3A%2F%2Fstatic.qspfw.moe.gov.cn%2Fxf2024%2Flearn_practice_list.html

视频演示地址:https://www.bilibili.com/video/BV1TKyHYsEZx/

进入正题:
  • 其实分析过程没什么难的,就是完成每一个板块,系统会发一个请求,然后完成前两个板块后才能答题~{:1_896:}
  • 代码文件为1个,这1个放在一个服务器目录就行。
  • 1.index.php
  • 使用方法首先去上方网址登录你的账号密码,成功进入后
  • F12控制台的应用----找到cookie-----找到SESSION这一栏----复制这一栏(如下图)实在不会看上方视频!!!

然后去网址复制这个token然后点击提交就行了,演示网站我就不放了,避免侵权~~~
不是不给大家搭建,我服务器害怕被各位大佬D,我就不放了!
上代码!
下方为index.php
[Asm] 纯文本查看 复制代码
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>无限进步~</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .container {
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            text-align: center;
            width: 100%;
            max-width: 400px;
        }
        h1 {
            margin-bottom: 20px;
        }
        form {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        label {
            margin-bottom: 10px;
        }
        input[type="text"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        button {
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #0056b3;
        }
        .status {
            margin-top: 20px;
            font-size: 18px;
            color: green;
        }
    </style>
</head>
<body>
    <div class="container">
        <?php
        session_start();
        if ($_SERVER['REQUEST_METHOD'] === 'POST') {
            $access_token = $_POST['access_token'];

            function sendCurlRequest($url, $headers) {
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, $url);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
                $response = curl_exec($ch);
                if (curl_errno($ch)) {
                    echo 'Error:' . curl_error($ch);
                }
                curl_close($ch);
                return $response;
            }

            // 第一个请求
            $url1 = 'https://api.qspfw.moe.gov.cn/examApi/practice/studyByColumnId?columnId=357&taskId=25';
            $headers1 = [
                'Pragma: no-cache',
                'access-token: ' . $access_token,
                'sourceId: 2',
                'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'
            ];
            $response1 = sendCurlRequest($url1, $headers1);

            // 第二个请求
            $url2 = 'https://api.qspfw.moe.gov.cn/examApi/practice/practice?columnId=357&taskId=25';
            $headers2 = [
                'Pragma: no-cache',
                'access-token: ' . $access_token,
                'sourceId: 3',
                'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
                'Content-Type: application/x-www-form-urlencoded'
            ];
            $response2 = sendCurlRequest($url2, $headers2);

            echo "<div class='status'>第一板块已完成</div>";

            // 第三个请求
            $url3 = 'https://api.qspfw.moe.gov.cn/examApi/practice/studyByColumnId?columnId=358&taskId=25';
            $headers3 = [
                'Pragma: no-cache',
                'access-token: ' . $access_token,
                'sourceId: 2',
                'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'
            ];
            $response3 = sendCurlRequest($url3, $headers3);

            // 第四个请求
            $url4 = 'https://api.qspfw.moe.gov.cn/examApi/practice/practice?columnId=358&taskId=25';
            $headers4 = [
                'Pragma: no-cache',
                'access-token: ' . $access_token,
                'sourceId: 3',
                'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
                'Content-Type: application/x-www-form-urlencoded'
            ];
            $response4 = sendCurlRequest($url4, $headers4);

            echo "<div class='status'>第二板块已完成</div>";

            // 第五个请求
            $url5 = 'https://api.qspfw.moe.gov.cn/examApi/paper/getPaper?taskId=25';
            $headers5 = [
                'Pragma: no-cache',
                'access-token: ' . $access_token,
                'sourceId: 3',
                'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
                'Content-Type: application/x-www-form-urlencoded'
            ];
            $response5 = sendCurlRequest($url5, $headers5);

            // 解析第五个请求的响应,提取 resultId
            $data5 = json_decode($response5, true);
            $resultId = $data5['data']['resultId'];

            // 第六个请求
            $url6 = 'https://api.qspfw.moe.gov.cn/examApi/paper/saveResult?taskId=25&paperId=2998&resultId=' . $resultId . '&answers=5876_D@!@5872_A@!@5874_C@!@5875_D@!@5873_D@!@5966_D@!@5963_D@!@5965_D@!@5962_D@!@5964_C@!@&takeTime=64';
            $headers6 = [
                'Pragma: no-cache',
                'access-token: ' . $access_token,
                'sourceId: 3',
                'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
                'Content-Type: application/x-www-form-urlencoded'
            ];
            $response6 = sendCurlRequest($url6, $headers6);

            echo "<div class='status'>当前正确答案已提交!</div>";
        } else {
        ?>
            <h1>无限进步~</h1>
            <form method="post" action="">
                <label for="access_token">Access Token:</label>
                <input type="text" id="access_token" name="access_token" required>
                <button type="submit">提交</button>
            </form>
        <?php
        }
        ?>
    </div>
</body>
</html>

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
知心 + 1 + 1 用心讨论,共获提升!

查看全部评分

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

来自 2#
 楼主| SVIP9大会员 发表于 2024-10-22 18:12 |楼主
视频演示地址:https://www.bilibili.com/video/BV1TKyHYsEZx/
3#
知心 发表于 2024-10-22 18:18
用户标识用接口调试软件的,此地无银三百两

免费评分

参与人数 1热心值 +1 收起 理由
SVIP9大会员 + 1 我很赞同!

查看全部评分

4#
 楼主| SVIP9大会员 发表于 2024-10-22 18:19 |楼主
知心 发表于 2024-10-22 18:18
用户标识用接口调试软件的,此地无银三百两

没看到你在说什么。请不要灌水!
5#
知心 发表于 2024-10-22 18:20
SVIP9大会员 发表于 2024-10-22 18:19
没看到你在说什么。请不要灌水!

'User-Agent: Apifox/1.0.0 (https://apifox.com)',
6#
 楼主| SVIP9大会员 发表于 2024-10-22 18:22 |楼主
知心 发表于 2024-10-22 18:20
'User-Agent: Apifox/1.0.0 (https://apifox.com)',

一个在线调试的,不影响你使用!那个没什么关系~我生成请求接口代码的时候习惯用这个而已,你丢到服务器一样能用,这个调试网站不是我的网站,就一个调试工具不是很正常吗。
7#
知心 发表于 2024-10-22 18:23
SVIP9大会员 发表于 2024-10-22 18:22
一个在线调试的,不影响你使用!那个没什么关系~我生成请求接口代码的时候习惯用这个而已,你丢到服务器 ...

是说目标网站会很容易检测到行为异常。没其他说法

免费评分

参与人数 1吾爱币 +1 收起 理由
SVIP9大会员 + 1 已修改

查看全部评分

8#
rsamv 发表于 2024-10-22 18:31
已经做完了才看到,但是谢谢分享)
9#
jsjrj01 发表于 2024-10-22 19:12
不懂web开发的,冒昧问下,答案的提交,是不是自己根据正确答案编排出的参数啊。因为别的答题网站弄到答案就是个头疼的事
10#
 楼主| SVIP9大会员 发表于 2024-10-22 19:36 |楼主
jsjrj01 发表于 2024-10-22 19:12
不懂web开发的,冒昧问下,答案的提交,是不是自己根据正确答案编排出的参数啊。因为别的答题网站弄到答案 ...

都是一样的,总共就是10道题,顺序不影响~
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

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

GMT+8, 2024-10-22 23:46

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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