Commit 52762b92 authored by yzddmr6's avatar yzddmr6 Committed by Medicean

(Enhance: Core/ASPXCSHARP) 新增 aspxcsharp类型

parent 80e82185
......@@ -168,7 +168,7 @@ const antSword = window.antSword = {
};
//核心模块类型列表
antSword['core_types'] = ['asp','aspx','php','php4','jsp','jspjs','cmdlinux','custom', 'phpraw'];
antSword['core_types'] = ['asp','aspx','aspxcsharp','php', 'php4','phpraw','jsp','jspjs','cmdlinux','custom'];
// 加载核心模板
antSword['core'] = require('./core/');
......
/**
* aspxcsharp::default解码器
*/
'use strict';
module.exports = {
asoutput: () => {
return ``.replace(/\n\s+/g, '');
},
decode_buff: (buff) => {
return buff;
}
}
\ No newline at end of file
/**
* ASPXCsharp服务端脚本模板
* 开写:2021/11/09
* 更新:-
* 作者:yzddMr6 <https://github.com/yzddmr6>
*
*/
"use strict";
// import Base from '../base';
const Base = require("../base");
class ASPXCSHARP extends Base {
constructor(opts) {
super(opts);
// 解析模板
[
"base",
"command",
"filemanager",
'database/sqlserver',
'database/mysql',
'database/oracle'
].map((_) => {
this.parseTemplate(`./aspxcsharp/template/${_}`);
});
// 解析编码器
this.encoders.map((_) => {
this.parseEncoder(`./aspxcsharp/encoder/${_}`);
});
this.decoders.map((_) => {
this.parseDecoder(`./aspxcsharp/decoder/${_}`);
});
}
/**
* 获取编码器列表
* @return {array} 编码器列表
*/
get encoders() {
return [];
}
get decoders() {
return ["default"];
}
/**
* HTTP请求数据组合函数
* @param {Object} data 通过模板解析后的代码对象
* @return {Promise} 返回一个Promise操作对象
*/
complete(data, force_default = false) {
// 分隔符号
let tag_s, tag_e;
// if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tags']) {
// tag_s = this.__opts__['otherConf']['custom-datatag-tags'];
// } else {
// tag_s = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "->|";
// }
// if (this.__opts__['otherConf'].hasOwnProperty('use-custom-datatag') && this.__opts__['otherConf']['use-custom-datatag'] == 1 && this.__opts__['otherConf']['custom-datatag-tage']) {
// tag_e = this.__opts__['otherConf']['custom-datatag-tage'];
// } else {
// tag_e = Math.random().toString(16).substr(2, parseInt(Math.random() * 8 + 5)); // "|<-";
// }
tag_s = "->|";
tag_e = "|<-";
let aspxencode = this.__opts__["encode"];
switch (this.__opts__["encode"]) {
case "UTF8":
aspxencode = "UTF-8";
break;
default:
break;
}
return this.encodeComplete(tag_s, tag_e, data);
}
}
module.exports = ASPXCSHARP;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
Driver={MySql ODBC 5.2 Unicode Driver};Server=localhost;database=information_schema;UID=root;PWD=root;
*/
module.exports = require('./default');
\ No newline at end of file
/*
oracle
*/
module.exports = require('./default');
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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