雷池waf 逆向

声明

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

部分python代码

复制代码
cp = execjs.compile(open('waf.js','r',encoding='utf-8').read())
result = cp.call('getResult', data)
print(result)
url = "/challenge/v2/api/verify"
data = {
    "issue_id": issue_id,
    "result": result,
    "serials": [],
    "client": {
        "visitorId": "",
    }
}
headers = {
    "Accept": "*/*",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Cache-Control": "no-cache",
    "Connection": "keep-alive",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "cross-site",
}
data = json.dumps(data, separators=(',', ':'))
response = session.post(url, headers=headers, data=data)

jwt = response.json()['data']['jwt']
session.cookies.set("sl-challenge-jwt", jwt)
url = "/notice/"
response = session.get(url, headers=headers)

print(response.text)
print(response.cookies)
print(response.status_code)
复制代码
cp = execjs.compile(open('waf.js','r',encoding='utf-8').read())
result = cp.call('getResult', data)
print(result)
url = "/challenge/v2/api/verify"
data = {
    "issue_id": issue_id,
    "result": result,
    "serials": [],
    "client": {
        "visitorId": "",
    }
}
headers = {
    "Accept": "*/*",
    "Accept-Language": "zh-CN,zh;q=0.9",
    "Cache-Control": "no-cache",
    "Connection": "keep-alive",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "cross-site",
}
data = json.dumps(data, separators=(',', ':'))
response = session.post(url, headers=headers, data=data)

jwt = response.json()['data']['jwt']
session.cookies.set("sl-challenge-jwt", jwt)
url = "/notice/"
response = session.get(url, headers=headers)

print(response.text)
print(response.cookies)
print(response.status_code)

结果

总结

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

相关推荐
better_liang几秒前
每日Java面试场景题知识点之-XXL-JOB分布式任务调度实践
java·spring boot·xxl-job·分布式任务调度·企业级开发
会游泳的石头2 分钟前
一行注解防死循环:MyBatis 递归深度限制(无需 level 字段)
java·mybatis
q***o3763 分钟前
Spring Boot环境配置
java·spring boot·后端
oMcLin5 分钟前
如何在SUSE Linux Enterprise Server 15 SP4上通过配置并优化ZFS存储池,提升文件存储与数据备份的效率?
java·linux·运维
WangYaolove131414 分钟前
Python基于大数据的电影市场预测分析(源码+文档)
python·django·毕业设计·源码
TaiKuLaHa19 分钟前
Spring Bean的生命周期
java·后端·spring
知乎的哥廷根数学学派25 分钟前
基于自适应多尺度小波核编码与注意力增强的脉冲神经网络机械故障诊断(Pytorch)
人工智能·pytorch·python·深度学习·神经网络·机器学习
yeziyfx33 分钟前
kotlin中 ?:的用法
android·开发语言·kotlin
charlie11451419144 分钟前
嵌入式的现代C++教程——constexpr与设计技巧
开发语言·c++·笔记·单片机·学习·算法·嵌入式