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Mi8xMzkyMi8xMTI0NjQ0ODg5LTM1NDB4MzU0MF9uM18ldmsldS5qcGciLz48L$xldmVsPjxsZXZlbCB0aWxlZGltYWdld$lkdGg9IjE3NzAiIHRpbGVkaW1hZ$VoZWlnaHQ9IjE3NzAiPjx1cCB1cmw9Imh0dHA6Ly9mLmV4cG9vbi5jb$0vc3ViNC91c$VyL1Bhbm9yYW1hLzIyLzEzOTIyLzExMjY4NDg1NDUtMzU0MHgzNTQwX$4yXyV$ayV1LmpwZyIvPjxkb3duIHVybD0iaHR0cDovL$YuZXhwb$9uLmNvbS9ZrJXUuanBnIi8+PGRvd$4gdXJsPSJodHRwOi8vZi5leHBvb$4uY$9tL3N1YjQvdXNlci9QYW5vcmFtYS8yMi8xMzkyMi8wMTEzNzQzNzgyLTMzMjR4MzMyNF9uMV8ldmsldS5qcGciLz48bGVmdCB1cmw9Imh0dHA6Ly9mLmV4cG9vbi5jb$0vc3ViNC91c$VyL1Bhbm9yYW1hLzIyLzEzOTIyLzAxMT5qE6JCo6L6+IiB1cmw9Imh0dHA6Ly9zc$RmYWRhZGFzZCIgaWNvPSJodHRwOi8vcy5leHBvb$4uY$9tL$ltYWdlL3VzZXIvZGVmYXVsdC1saW5rLWljby90YW9iYW8ucG5nIi8+PGxpbmsgbmFtZT0ibGlua18yNzcwIiB0aXRsZT0iZGFzZHNhZGFzZCIgdXJsPSJodHRwOi8vZHNhZHNhZGRjYXNkYXNhZHNhIiBpY$89Imh0dHA6Ly9zLmV4cG9vbi5jb$0vaW1hZ$UvdXNlci9kZWZhdWx0LWxpbmstaWNvL$RpYW5waW5nLnBuZyIvPjwvbGlua$RhdGE+PC9wb$ludGRhdGE+PC9rcnBhbm8+Cg==")
1
happyday517 2017-02-07 15:00:42 +08:00
jquery + jsonp
base64 |
2
yao978318542 OP @happyday517 #1 能解密吗?求告知方法?
|
3
leafin 2017-02-07 16:27:39 +08:00
base64
|
4
yao978318542 OP @leafin #3 不对解码不了啊
|
5
xqin 2017-02-07 17:28:06 +08:00
@yao978318542 代码哪来的? 既然是返回给前端用的, 那肯定有还原的代码. 上 URL 或者上代码..
|
6
yao978318542 OP |
7
xqin 2017-02-07 18:14:38 +08:00
@yao978318542 这个是输出这段数据的地方, 那使用的呢? 是你是在哪个页面上发现有代码调用这个接口的.
|
8
exoticknight 2017-02-07 18:21:14 +08:00
解密出来好像是一个 xml ,不过还要看 charset ……
|
9
xqin 2017-02-07 18:21:24 +08:00
@yao978318542 找到了.
还原的方法为: 将收到的字符串里的 $ 符号替换为 你那个 uid%10 (即 uid 取余 10) 之后的内容, 然后 Base64 解码就可以了. 还原代码来自于: http://s.expoon.com/image/z/krpano/js/expoon.api.js?time=201612141434 这个文件 var thiskey = user_id % 10; var a = 'PD94bWwgdmVyc$lvbj0iMS4wIiBlbmNvZGluZz0id.................' var c = a.replace(/\$/g, thiskey); var b = new Base64(); c = b.decode(c); |
10
yao978318542 OP @xqin #9 不对 解密不了啊!我试了好几遍解密不出来
|
11
yao978318542 OP @exoticknight #8 你能解析出来吗? 万分感谢
|
12
xqin 2017-02-07 19:28:39 +08:00
@yao978318542 你不知道 取余是什么意思吗?
下面为 PHP 代码,你可以自己运行一下, <?php $uid = 13922; $url = 'http://api.expoon.com/XmlKrpano/getCrptyXml/uid/' . $uid; $data = file_get_contents($url); $data = substr($data, 2, -2); //去掉不需要的内容 $key = $uid % 10; //得到 key $data = str_replace('$', $key, $data); //进行替换 $data = base64_decode($data); // base64 解码 var_dump($data);//输出内容 |
13
yao978318542 OP @xqin #12 万分感谢!(づ ̄ 3  ̄)づ
|