captchaBody详情滑块分析

声明

本文章中所有内容仅供学习交流使用,不用于其他任何目的,抓包内容、敏感网址、数据接口等均已做脱敏处理,严禁用于商业用途和非法用途,否则由此产生的一切后果均与作者无关!

分析

轨迹代码

def distribute_relative_time_along_trajectory(start, end, total_time, num_points):
    trajectory_with_time = []

    # 预先计算每个点的基础时间分配
    base_time_per_point = total_time // num_points

    # 分配时间
    for i in range(num_points):
        # 为每个点分配时间,允许一定范围的随机波动
        time_for_segment = base_time_per_point + random.randint(-5, 5)
        # 确保时间至少为1,且不会超过剩余的总时间
        time_for_segment = max(1, min(time_for_segment, total_time))

        # 计算该点在轨迹上的位置
        position_fraction = i / num_points
        position = [
            start[0] + round(position_fraction * (end[0] - start[0])),
            start[1] + round(position_fraction * (end[1] - start[1]))
        ]

        # 记录时间点
        trajectory_with_time.append({'x': position[0], 'y': position[1], 'relative_time': time_for_segment})

        # 更新剩余时间
        total_time -= time_for_segment

    # 确保最后一个点在终点
    trajectory_with_time[-1]['x'], trajectory_with_time[-1]['y'] = end

    # 如果有剩余时间,平均分配到每个点
    remaining_time = total_time
    if remaining_time > 0:
        # 计算每个点可以增加的时间
        additional_time_per_point = remaining_time // num_points
        # 分配剩余时间到每个点
        for point in trajectory_with_time:
            point['relative_time'] += additional_time_per_point
        # 分配剩余的不能整除的时间
        for i in range(remaining_time % num_points):
            trajectory_with_time[i]['relative_time'] += 1

    return trajectory_with_time
def distribute_time_along_trajectory(start, end, total_time, num_points):
    trajectory_with_time = []

    # 预先计算每个点的基础时间分配
    base_time_per_point = total_time // num_points

    # 分配时间
    for i in range(num_points):
        # 为每个点分配时间,允许一定范围的随机波动
        time_for_segment = base_time_per_point + random.randint(-5, 5)
        # 确保时间至少为1,且不会超过剩余的总时间
        time_for_segment = max(1, min(time_for_segment, total_time))

        # 计算该点在轨迹上的位置
        position_fraction = i / num_points
        position = [
            start[0] + round(position_fraction * (end[0] - start[0])),
            start[1] + round(position_fraction * (end[1] - start[1]))
        ]

        # 记录时间点
        trajectory_with_time.append({'x': position[0], 'y': position[1], 'time': time_for_segment})

        # 更新剩余时间
        total_time -= time_for_segment

    # 确保最后一个点在终点
    trajectory_with_time[-1]['x'], trajectory_with_time[-1]['y'] = end

    # 如果有剩余时间,平均分配到每个点
    remaining_time = total_time
    if remaining_time > 0:
        # 计算每个点可以增加的时间
        additional_time_per_point = remaining_time // num_points
        # 分配剩余时间到每个点
        for point in trajectory_with_time:
            point['time'] += additional_time_per_point
        # 分配剩余的不能整除的时间
        for i in range(remaining_time % num_points):
            trajectory_with_time[i]['time'] += 1

    return trajectory_with_time

部分加密流程代码

data1=JSON.stringify(data)
str1=window.TA.create().start().update(data1).digest().toHex()
data2=window.t_(data1)
str2=window.e_(data2)
str3=str1+str2
str5=window.TA.create().start().update(str4).digest().toHex()
salt=''
salt2=str5+salt
salt3=window.Xg(salt2)
str6=window.TA.create().start().update(salt3).digest().toHex()

 缓冲区合并

buffer1Value = []
buffer2= []
buffer3=new window.i(aesKey,iv,undefined,undefined).encrypt(window.Jg(str3))
// buffer2Value 是要拼接的值
// 创建一个新的 Uint8Array,其长度为 buffer1Value、buffer2 和 buffer3 的长度之和
var combinedBuffer = new Uint8Array(buffer1Value.length + buffer2.length + buffer3.length);
// 将 buffer1Value 的值复制到 combinedBuffer
combinedBuffer.set(buffer1Value, 0);
// 将 buffer2 的值复制到 combinedBuffer,从 buffer1Value 的长度开始
combinedBuffer.set(buffer2, buffer1Value.length);
// 将 buffer3 的值复制到 combinedBuffer,从 buffer1Value 和 buffer2 的总长度开始
combinedBuffer.set(buffer3, buffer1Value.length + buffer2.length);

结果

 总结

1.出于安全考虑,本章未提供完整流程,调试环节省略较多,只提供大致思路,具体细节要你自己还原,相信你也能调试出来。

  • 7
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值