Commit dc0210d5 authored by Medicean's avatar Medicean

Remove(Encoder/random): 移除 random 编码器

parent 5fa6caef
...@@ -30,6 +30,11 @@ eg: ...@@ -30,6 +30,11 @@ eg:
因为 `phpinfo();` 会显示发送的 payload, 发送的 payload 中含有数据分割符,导致分割出错 因为 `phpinfo();` 会显示发送的 payload, 发送的 payload 中含有数据分割符,导致分割出错
* 移除 random 编码器
> 能够适配所有编码器的Shell比较少, 这个功能就略显鸡肋, 我们决定移除它
## 2021/02/06 `v(2.1.10)` ## 2021/02/06 `v(2.1.10)`
### 核心 ### 核心
......
...@@ -36,22 +36,25 @@ class Base { ...@@ -36,22 +36,25 @@ class Base {
return data; return data;
}, },
/** /**
* 随机编码器 * v2.1.11 Remove random encoder
* @param {String} pwd 连接密码
* @param {Object} data 请求数据
* @return {Object} 生成数据
*/ */
random(pwd, data) { // /**
let _encoders = []; // * 随机编码器
for (let _ in this) { // * @param {String} pwd 连接密码
if (_ === 'random') { // * @param {Object} data 请求数据
continue // * @return {Object} 生成数据
} // */
_encoders.push(_); // random(pwd, data) {
} // let _encoders = [];
let _index = parseInt(Math.random() * _encoders.length); // for (let _ in this) {
return this[_encoders[_index]](pwd, data); // if (_ === 'random') {
} // continue
// }
// _encoders.push(_);
// }
// let _index = parseInt(Math.random() * _encoders.length);
// return this[_encoders[_index]](pwd, data);
// }
} }
this['__decoder__'] = {} this['__decoder__'] = {}
// 解析自定义编码器 // 解析自定义编码器
......
...@@ -377,15 +377,18 @@ class Form { ...@@ -377,15 +377,18 @@ class Form {
label: `default\t(${LANG['list']['not_recommended']})`, label: `default\t(${LANG['list']['not_recommended']})`,
checked: true checked: true
}]; }];
if (c !== 'custom') { /**
_.push({ * v2.1.11 Remove random encoder
type: 'radio', */
name: `encoder_${c}`, // if (c !== 'custom') {
value: 'random', // _.push({
label: `random\t(${LANG['list']['not_recommended']})`, // type: 'radio',
checked: _encoder === 'random' // name: `encoder_${c}`,
}); // value: 'random',
} // label: `random\t(${LANG['list']['not_recommended']})`,
// checked: _encoder === 'random'
// });
// }
encoders.map((e) => { encoders.map((e) => {
_.push({ _.push({
type: 'radio', type: 'radio',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment