2026数字中国创新大赛初赛wp之俩签到题

缘起

这俩题是web题,比较简单,尤其是对程序员来说,只能算签到题了–人菜还狂!

俩道题目的内容js在:https://cloud.189.cn/t/67NVn2RVZrU3(访问码:ap1m)

题目一

请添加图片描述

说他简单,是因为提示的太多,文件干扰也太少,所以很容易就看出来了。

提示是有个隐藏的接口,那肯定在前端代码里面啊,然后打开前端代码,格式化发现就这么几行:

题目文件位云盘中的api.js

请添加图片描述

没有混淆、没有加密,直接拷贝到一个js文件,用node跑一下就可以了:

请添加图片描述

为了写这文,用ai根据这个代码美化注释了一下(其实比赛的时候直接拷贝原网站的js文件去执行即可):

async function callEncryptedAPI() {
    try {
        console.log('=== 开始调用加密API ===\n');        
        // API路径
        const apiPath = '/api/v2/f7e9/data';        
        // 生成时间戳(秒级)
        const timestamp = Math.floor(Date.now() / 1000).toString();
        console.log(`1. 生成时间戳: ${timestamp}`);        
        // 生成签名
        const signature = await generateSignature(apiPath, timestamp);
        console.log(`2. 生成签名: ${signature}`);       
        // 构建完整URL
        const fullUrl = `${SERVER_URL}${apiPath}?t=${encodeURIComponent(timestamp)}&s=${encodeURIComponent(signature)}`;
        console.log(`3. 请求URL: ${fullUrl}`);        
        // 发送请求
        console.log(`4. 发送请求到服务器...`);
        const startTime = Date.now();        
        const response = await fetch(fullUrl, {
            method: 'GET',
            headers: {
                'Accept': 'application/json',
                'User-Agent': 'Node.js API Client/1.0'
            },
            timeout: 10000 // 10秒超时
        });
        
        const responseTime = Date.now() - startTime;
        console.log(`5. 服务器响应时间: ${responseTime}ms`);
        console.log(`6. 响应状态: ${response.status} ${response.statusText}`);
        
        // 检查响应状态
        if (!response.ok) {
            throw new Error(`HTTP错误: ${response.status} ${response.statusText}`);
        }
        
        // 解析响应数据
        const data = await response.json();
        console.log(`7. 响应数据:`);
        console.log(JSON.stringify(data, null, 2));      
        return data;
        
    } catch (error) {
        console.error(`\n❌ API调用失败:`);
        console.error(`   错误信息: ${error.message}`);
        throw error;
    }
}

题目二

请添加图片描述

这题是websocket,虽然少见,但一样的问题:提示太多,代码太少,混淆没有,一眼出:

文件为云盘中的main.js

自带注释,很快找到配置:

请添加图片描述

然后往下就找到了关键的用户名:admin

请添加图片描述

接下来就是直接修改参数,况且config还是个全局参数,直接F12打开console窗口执行就可以了:

请添加图片描述

自此,俩到签到题都结束了!

小结

这俩题确实简单,只能是签到题了,先这样吧!

本次比赛其他题目

2026数字中国创新大赛数字安全赛道writeup之web题目一

Logo

更多推荐