Giter Club home page Giter Club logo

xy_learnrecord's Introduction

华中师范大学小雅平台学习时长脚本

网络分析

打开一个课程,使用控制台进行网络分析

通过网络监听

image-20240331140852362

找到 learnRecord ,根据名称就可以判断其为学习时长统计

查看标头

image-20240331142045825

对时间进行分析,发现为每隔一分钟发送一次

image-20240331141638648

image-20240331141559497

查看载荷,每次请求的载荷都一样

image-20240331141833185

对载荷内容进行分析

  • clientType 身份类型
  • group_id 班级id
  • resourceId 当前任务id
  • roleType 身份类型
  • user_id 用户id,非手机号

响应结果

image-20240331150319844

对多个响应结果进行分析,以下参数值会发生变化

  • partition 无规律
  • baseOffset 无规律
  • logAppendTime 不断增加,猜测为记录的时间,但是未呈现递增趋势

模拟发送

代码如下

# duration为运行次数,即时间。发送一次为一分钟
def send_post(duration,data):
    for _ in range(duration):
        response = requests.post(url,headers=headers,json=data)
        if response.status_code == 200:    
            print('Request successful: ', response.text)  
        else:  
            print('Request failed: ', response.status_code, response.text)

运行发现,服务器对时间间隔没有限制

经过实验,时长成功计入

后续可能更新油猴脚本

其他

在监听过程中,发现 global 这一项,它和 learnRecord 一样每隔一分钟发送一次。

笔者猜测其为开发测试的遗留,响应中包含开发者的名称和手机号、测试用的手机号、测试 ip 等

image-20240331145624301

希望开发者对其进行处理

xy_learnrecord's People

Contributors

zzh-0 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.