逆向07-看准网


看准网-找职位

1.参数入口定位的三种方式

前提操作
1.1.1 打开网站---开发者模式---刷新
image
点击北京获取目标请求
image
参数和响应都是加密的
image

1.1 直接使用请求堆栈

image

image

根据上面两张图我们可以看到params已经是加密的值了
image
Tip:在看拦截器的时候,我们可以先去“前一步”看看,要是“前一步”有加密值,我们就不看拦截器了
image
去前一步:一定要注意是不是目标请求
image
可以看到已经是加密的值了,所以拦截器就可以直接略过了
image
有三个函数--要一个一个的读一下
image

省略T/T
image
找到了
image

image

1.2 kiv 关键字

image

1.3 encrypt 关键字

image

2 请求逆向

image

2.1 webpack 环境准备

image
打断点-----找到n,进去看
image
image
加载器修改三行代码
image
image
调用-报错
image
解决报错
是因为我们在调用 加载器 的时候 没有把值【也就是mod里是没有数据的】传进去
image
image
加载成功了
image

2.2 webpack 使用

回忆
image

数据准备

// 数据s
s = M._A()


// 数据t

// n 是直接copy出来的
n = '{"cityCode":101280100,"salaryId":0,"experienceId":0,"curPage":1}'
t = M.mA(n, {
        iv: s
    }).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "~");

console.log(t)

整合之后

function test(n){
    s = M._A()
    
    t = M.mA(n, {
            iv: s
        }).replace(/\//g, "_").replace(/\+/g, "-").replace(/=/g, "~");
    
    return [t, s]
}

在python中调用

e = {"cityCode":101020100,"salaryId":0,"experienceId":0,"curPage":1}
e = json.dumps(e)
text = execjs.compile(open("07ru.js").read()).call("test", e)
params = {
  "b": text[0],
  "kiv": text[1]
}

获取加密的数据
image

3 响应逆向

image
看谁调用
image
没有看到实质性的逻辑--继续看谁调用
image
看到上图 是不是就知道了呀

上代码:

function dec(enc_data, kiv){
    let t = M.gy(enc_data,
        {
            iv: kiv
        }
    );
return t
}

python调用

# 数据
e = {"cityCode":101020100,"salaryId":0,"experienceId":0,"curPage":1}
e = json.dumps(e)
# 请求加密
enc_text = execjs.compile(open("07ru.js").read()).call("enc", e)
params = {
  "b": enc_text[0],
  "kiv": enc_text[1]  # kiv 解密的时候要用
}

response = requests.get('https://www.kanzhun.com/api_to/channel/job/list.json', params=params, cookies=cookies, headers=headers)

# 返回值解密
dec_text = execjs.compile(open("07ru.js").read()).call("dec", response.text, enc_text[1])
print(dec_text)

附总代码

posted @ 2024-07-25 19:32  流年中渲染了微笑  阅读(6)  评论(0)    收藏  举报