某翻译网站逆向线索


分词接口

请求分词的接口是不一样的

目前遇到了两种分词的接口 LMT_split_textLMT_split_text,LMT_split_into_sentences

image-20221123173007819

image-20221123173015662

触发情况未知

request_id 算法

var a = 1e4 * Math.round(1e4 * Math.random())

request_id 会先基于以上规则产生,然后每次请求 + 1。

method 后的神秘空格

通过对比成功和失败请求发现,deepl 在构造请求体时特地在 method: 后面多加了一个空格。如果没有空格大概率会 429.

image-20221124125209457

空格的生成逻辑

空格会根据 request_id 来决定

image-20221123173041740

其中 t 为 request_id, 生成逻辑为:

return e.replace(‘hod”:”‘, (t + 3) % 13 == 0 || (t + 5) % 29 == 0 ? ‘hod” : “‘ : ‘hod”: “‘)

在首次访问 deepl 时,会由前端生成一个 dapUid,带在 cookie 中。

是一个使用 crypto 生成的随机字符串。

image-20221123173114691

timestamp

timestamp 会根据sentence 中 i 数量改变,但是这个改变很细微。

image-20221124125226917


Author: Lic
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source Lic !
  TOC