解码问题

WBOY
Release: 2016-06-06 20:46:21
Original
1586 people have browsed it

想通过来源获取关键词:

例:http://m.baidu.com/from=2001a/s?word=%258d%255d%2529&ix=358%25

<code>%258d%255d%2529 百度后台解码是 “鹅”
</code>
Copy after login
Copy after login

想知道这个是怎么解码的?

php/pyton 如何实现解码?

以下是百度的部分加密js。
i = encodeURIComponent(i);
i = i.replace(/%(.{2})/gi,function(l) {
var m = l.replace("%", "");
m = parseInt(m, 16);
m = parseInt(j) + m;
m = m % 256;
m = m.toString(16);
if (m.length m = "0" + m
}
m = "%" + m;
return m
});
i代表输入字符串,j是百度后台生成的数字(百度生成2个数字,一个是j,另一个是ix,ix就是网址ix参数,如上例中 ix=358)

刷新了几次网页,百度生成的 ix 和 j 如下:

ix j

282 130
48 71
395 92
154 3
545 3
785 3

通过 以上js编码函数 编码(j,搜索词)=结果,然后得出这样的链接:
http://m.baidu.com/from=2001a/s?word=结果&ix=百度生成的ix%25

回复内容:

想通过来源获取关键词:

例:http://m.baidu.com/from=2001a/s?word=%258d%255d%2529&ix=358%25

<code>%258d%255d%2529 百度后台解码是 “鹅”
</code>
Copy after login
Copy after login

想知道这个是怎么解码的?

php/pyton 如何实现解码?

以下是百度的部分加密js。
i = encodeURIComponent(i);
i = i.replace(/%(.{2})/gi,function(l) {
var m = l.replace("%", "");
m = parseInt(m, 16);
m = parseInt(j) + m;
m = m % 256;
m = m.toString(16);
if (m.length m = "0" + m
}
m = "%" + m;
return m
});
i代表输入字符串,j是百度后台生成的数字(百度生成2个数字,一个是j,另一个是ix,ix就是网址ix参数,如上例中 ix=358)

刷新了几次网页,百度生成的 ix 和 j 如下:

ix j

282 130
48 71
395 92
154 3
545 3
785 3

通过 以上js编码函数 编码(j,搜索词)=结果,然后得出这样的链接:
http://m.baidu.com/from=2001a/s?word=结果&ix=百度生成的ix%25

<code>url_encode
url_decode
</code>
Copy after login

请问谁知道 ix和j的映射关系????
求助!!!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template