Commit dc0210d5 authored by Medicean's avatar Medicean

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

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