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
900d18fd
Commit
900d18fd
authored
Dec 24, 2018
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance:Modules:ShellManager)添加 Shell 时根据文件后缀选择 Shell 类型并赋予默认编码(asp 默认 GBK, 其它默认 UTF8)
parent
ab6a1f51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
CHANGELOG.md
CHANGELOG.md
+7
-0
form.js
source/modules/shellmanager/list/form.js
+41
-0
No files found.
CHANGELOG.md
View file @
900d18fd
...
@@ -4,6 +4,13 @@
...
@@ -4,6 +4,13 @@
## `v(2.0.3-dev)`
## `v(2.0.3-dev)`
### 模块增强
#### Shell 管理
*
添加 Shell 时 URL 默认前缀
`http://`
*
添加 Shell 时根据文件后缀选择 Shell 类型并赋予默认编码(asp 默认 GBK, 其它默认 UTF8) #109
### Core
### Core
#### 后端模块
#### 后端模块
...
...
source/modules/shellmanager/list/form.js
View file @
900d18fd
...
@@ -168,6 +168,47 @@ class Form {
...
@@ -168,6 +168,47 @@ class Form {
}
}
]
}
]
}
],
true
);
],
true
);
form
.
attachEvent
(
'onChange'
,
(
_
,
id
)
=>
{
// 根据后缀自动修改 shell 类型
if
(
_
==
"url"
)
{
let
file_match
=
{
"php"
:
/
.
+
\
.
ph
(
p
[
345
]?
|
s
|
t
|
tml
)
/
,
"aspx"
:
/.+
\.
as
(
px|mx
)
/
,
"asp"
:
/
.
+
\
.(
as
(
p
|
a
|
hx
)
|
c
(
dx
|
er
))
/
,
"custom"
:
/
.
+
\
.((
jsp
[
x
]?)
|
cgi
)
/
,
}
let
typecombo
=
form
.
getCombo
(
'type'
);
if
(
file_match
.
php
.
test
(
id
)
==
true
)
{
typecombo
.
selectOption
(
typecombo
.
getOption
(
'php'
).
index
);
}
else
if
(
file_match
.
aspx
.
test
(
id
)
==
true
){
typecombo
.
selectOption
(
typecombo
.
getOption
(
'aspx'
).
index
);
}
else
if
(
file_match
.
asp
.
test
(
id
)
==
true
){
typecombo
.
selectOption
(
typecombo
.
getOption
(
'asp'
).
index
);
}
else
if
(
file_match
.
custom
.
test
(
id
)
==
true
){
typecombo
.
selectOption
(
typecombo
.
getOption
(
'custom'
).
index
);
}
}
// 默认编码设置
if
(
_
==
"type"
)
{
let
encodecombo
=
form
.
getCombo
(
'encode'
);
switch
(
id
)
{
case
'php'
:
encodecombo
.
selectOption
(
encodecombo
.
getOption
(
'UTF8'
).
index
);
break
;
case
'asp'
:
encodecombo
.
selectOption
(
encodecombo
.
getOption
(
'GBK'
).
index
);
break
;
case
'aspx'
:
encodecombo
.
selectOption
(
encodecombo
.
getOption
(
'UTF8'
).
index
);
break
;
case
'custom'
:
encodecombo
.
selectOption
(
encodecombo
.
getOption
(
'UTF8'
).
index
);
break
;
}
}
});
return
form
;
return
form
;
}
}
...
...
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