Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
c4c11d9c
Commit
c4c11d9c
authored
Mar 23, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(New:Core) 新增 PHP4 类型
parent
6cdd78eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
index.js
source/core/index.js
+1
-1
index.js
source/core/php4/index.js
+30
-0
form.js
source/modules/shellmanager/list/form.js
+9
-1
No files found.
source/core/index.js
View file @
c4c11d9c
...
...
@@ -14,7 +14,7 @@ class Core {
constructor
()
{
// 加载子模块列表
let
cores
=
{};
[
'php'
,
'asp'
,
'aspx'
,
'custom'
].
map
((
_
)
=>
{
[
'php'
,
'asp'
,
'aspx'
,
'custom'
,
'php4'
].
map
((
_
)
=>
{
cores
[
_
]
=
require
(
`./
${
_
}
/index`
);
});
// 返回子模块对象
...
...
source/core/php4/index.js
0 → 100644
View file @
c4c11d9c
/**
* PHP4 服务端脚本模板
*/
'use strict'
;
//const Base = require('../base');
const
PHP
=
require
(
'../php/index'
);
class
PHP4
extends
PHP
{
/**
* HTTP请求数据组合函数
* @param {Object} data 通过模板解析后的代码对象
* @return {Promise} 返回一个Promise操作对象
*/
complete
(
data
)
{
// 分隔符号
let
tag_s
=
Math
.
random
().
toString
(
16
).
substr
(
2
,
5
);
// "->|";
let
tag_e
=
Math
.
random
().
toString
(
16
).
substr
(
2
,
5
);
// "|<-";
// 组合完整的代码
let
tmpCode
=
data
[
'_'
];
data
[
'_'
]
=
`@ini_set("display_errors", "0");@set_time_limit(0);echo "
${
tag_s
}
";
${
tmpCode
}
;echo "
${
tag_e
}
";die();`
;
// 使用编码器进行处理并返回
return
this
.
encodeComplete
(
tag_s
,
tag_e
,
data
);
}
}
module
.
exports
=
PHP4
;
source/modules/shellmanager/list/form.js
View file @
c4c11d9c
...
...
@@ -287,7 +287,15 @@ class Form {
let
ret
=
[];
for
(
let
c
in
antSword
[
'core'
])
{
// 加载默认编码器和用户自定义编码器
let
encoders
=
antSword
[
'core'
][
c
].
prototype
.
encoders
.
concat
(
antSword
[
'encoders'
][
c
]);
let
encoders
;
switch
(
c
){
case
'php4'
:
encoders
=
antSword
[
'core'
][
'php4'
].
prototype
.
encoders
.
concat
(
antSword
[
'encoders'
][
'php'
]);
break
;
default
:
encoders
=
antSword
[
'core'
][
c
].
prototype
.
encoders
.
concat
(
antSword
[
'encoders'
][
c
]);
break
;
}
ret
.
push
({
text
:
c
.
toUpperCase
(),
value
:
c
,
selected
:
c
===
_default
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment