63js加密传输数据与返回数据二进制-RC4
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/10.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/11.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/12.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/13.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/14.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/15.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/7.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/8.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
猿人学练习/63js加密传输数据与返回数据二进制-RC4/img/9.png
Normal file
After Width: | Height: | Size: 13 KiB |
@ -80,9 +80,10 @@ function j(y) {
|
||||
}
|
||||
|
||||
|
||||
// code = s(j(64) + '1');
|
||||
// atob_code = atob(code);
|
||||
// console.log(atob_code);
|
||||
code = s(j(64) + '1');
|
||||
console.log(code);
|
||||
atob_code = atob(code);
|
||||
console.log(atob_code);
|
||||
|
||||
function sign(data, types) {
|
||||
if (types == 'atob'){
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||

|
||||
|
||||
请求体也是乱码
|
||||
### 请求体乱码
|
||||
|
||||

|
||||
|
||||
@ -38,3 +38,47 @@
|
||||

|
||||
|
||||
这里用的是 `crypto-js` 的`RC4`加密,
|
||||
|
||||
但是`RC4`加密结果不会出现乱码,尝试继续跟进代码看看具体原因
|
||||
|
||||
这里更近我是直接通过 `return` 关键词一步步断点进入
|
||||
|
||||
`return` 断点1
|
||||
|
||||

|
||||
|
||||
`return` 断点2
|
||||
|
||||

|
||||
|
||||
`return` 断点3
|
||||
|
||||

|
||||
|
||||
`return` 断点4
|
||||
|
||||

|
||||
|
||||
`return` 断点5,这里就发现`atob`方法,即`Base64`的解码过程
|
||||
|
||||

|
||||
|
||||
控制台输出
|
||||
|
||||

|
||||
|
||||
### 返回体乱码
|
||||
|
||||
既然已经知道加密用的是`atob`,那么解码会不会是`btoa`,继续调试
|
||||
|
||||

|
||||
|
||||
`btoa`即Base64的编码过程
|
||||
|
||||
在通过调试,发现`c`函数是`crypto-js`加密
|
||||
|
||||

|
||||
|
||||
到这里就基本结束了
|
||||
|
||||

|