Commit ccd2241c authored by yzddmr6's avatar yzddmr6

支持新增JSP编码器

parent 76047632
/** /**
* 中国蚁剑::编码器管理 * 中国蚁剑::编码器管理
* 创建:2017-05-30 * 创建:2017-05-30
* 更新:2018-08-19 * 更新:2020-11-03
* 作者:Virink <virink@outlook.com> * 作者:Virink <virink@outlook.com>
* 作者:Medici.Yan <Medici.Yan@gmail.com> * 作者:Medici.Yan <Medici.Yan@gmail.com>
* 作者:yzddMr6 <yzddmr6@gmail.com>
*/ */
const LANG = antSword['language']['settings']['encoders']; const LANG = antSword['language']['settings']['encoders'];
...@@ -59,6 +60,11 @@ class Encoders { ...@@ -59,6 +60,11 @@ class Encoders {
icon: 'file-code-o', icon: 'file-code-o',
type: 'button', type: 'button',
text: "PHP" text: "PHP"
}, {
id: 'new_jsp',
icon: 'file-code-o',
type: 'button',
text: "JSP"
}, { }, {
type: 'separator' type: 'separator'
}, { }, {
...@@ -129,6 +135,9 @@ class Encoders { ...@@ -129,6 +135,9 @@ class Encoders {
case "new_aspx": case "new_aspx":
that.createEncoder(id); that.createEncoder(id);
break; break;
case "new_jsp":
that.createEncoder(id);
break;
case "new_php": case "new_php":
case "new_php_rsa": case "new_php_rsa":
that.createEncoder(id); that.createEncoder(id);
...@@ -177,6 +186,7 @@ class Encoders { ...@@ -177,6 +186,7 @@ class Encoders {
combobox.put("asp", "ASP"); combobox.put("asp", "ASP");
combobox.put("aspx", "ASPX"); combobox.put("aspx", "ASPX");
combobox.put("php", "PHP"); combobox.put("php", "PHP");
combobox.put("jsp", "JSP");
combobox.put("custom", "CUSTOM"); combobox.put("custom", "CUSTOM");
grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) { grid.attachEvent("onEditCell", function (stage, rId, cInd, nValue, oValue) {
...@@ -208,7 +218,7 @@ class Encoders { ...@@ -208,7 +218,7 @@ class Encoders {
break break
case 2: case 2:
// type // type
if (nValue != "asp" && nValue != "aspx" && nValue != "php" && nValue != "custom") { if (nValue != "asp" && nValue != "aspx" && nValue != "php" && nValue != "jsp"&& nValue != "custom") {
toastr.error(LANG['message']["etype_error"], LANG_T['error']); toastr.error(LANG['message']["etype_error"], LANG_T['error']);
return return
} }
...@@ -747,12 +757,14 @@ module.exports = { ...@@ -747,12 +757,14 @@ module.exports = {
asp: [], asp: [],
aspx: [], aspx: [],
php: [], php: [],
jsp: [],
custom: [] custom: []
}; };
var encoders_path = { var encoders_path = {
asp: [], asp: [],
aspx: [], aspx: [],
php: [], php: [],
jsp: [],
custom: [] custom: []
}; };
let userencoder_path = path.join(remote.process.env.AS_WORKDIR, 'antData/encoders'); let userencoder_path = path.join(remote.process.env.AS_WORKDIR, 'antData/encoders');
...@@ -794,12 +806,14 @@ module.exports = { ...@@ -794,12 +806,14 @@ module.exports = {
asp: [], asp: [],
aspx: [], aspx: [],
php: [], php: [],
jsp: [],
custom: [] custom: []
}; };
var decoders_path = { var decoders_path = {
asp: [], asp: [],
aspx: [], aspx: [],
php: [], php: [],
jsp: [],
custom: [] custom: []
}; };
let userdecoder_path = path.join(remote.process.env.AS_WORKDIR, 'antData/encoders'); let userdecoder_path = path.join(remote.process.env.AS_WORKDIR, 'antData/encoders');
......
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