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
22ca72a7
Commit
22ca72a7
authored
May 12, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance:Core)解码器新增 ext 参数, 用于获取 shell 配置和rsa私钥
parent
67961ca6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
CHANGELOG.md
CHANGELOG.md
+2
-0
package.json
package.json
+1
-1
base.js
source/core/base.js
+6
-2
No files found.
CHANGELOG.md
View file @
22ca72a7
...
...
@@ -14,6 +14,8 @@
> 与之相关的一个 Demo, PHP aes-256-cfb (zeroPadding) 编码器
> https://github.com/AntSwordProject/AwesomeEncoder/blob/master/php/aes_256_cfb_zero_padding.js
*
解码器新增 ext 参数, 用于获取 shell 配置和rsa私钥
### 数据管理
*
「添加数据」时自动载入「默认设置」中「数据管理」全局配置内容
...
...
package.json
View file @
22ca72a7
{
"name"
:
"antsword"
,
"version"
:
"2.1.1.
5
"
,
"version"
:
"2.1.1.
6
"
,
"description"
:
"中国蚁剑是一款跨平台的开源网站管理工具"
,
"main"
:
"app.js"
,
"dependencies"
:
{
...
...
source/core/base.js
View file @
22ca72a7
...
...
@@ -247,6 +247,10 @@ class Base {
*/
request
(
code
,
chunkCallBack
)
{
const
opt
=
this
.
complete
(
code
);
let
ext
=
{
opts
:
this
.
__opts__
,
rsa
:
this
.
rsaEncrypt
()
}
return
new
Promise
((
res
,
rej
)
=>
{
// 随机ID(用于监听数据来源)
const
hash
=
(
String
(
+
new
Date
)
+
String
(
Math
.
random
())).
substr
(
10
,
10
).
replace
(
'.'
,
'_'
);
...
...
@@ -256,8 +260,8 @@ class Base {
.
once
(
`request-
${
hash
}
`
,
(
event
,
ret
)
=>
{
return
res
({
'encoding'
:
ret
[
'encoding'
]
||
""
,
'text'
:
this
.
__decoder__
[
this
.
__opts__
[
'decoder'
]
||
'default'
].
decode_str
(
ret
[
'text'
]),
'buff'
:
this
.
__decoder__
[
this
.
__opts__
[
'decoder'
]
||
'default'
].
decode_buff
(
ret
[
'buff'
])
'text'
:
this
.
__decoder__
[
this
.
__opts__
[
'decoder'
]
||
'default'
].
decode_str
(
ret
[
'text'
]
,
ext
),
'buff'
:
this
.
__decoder__
[
this
.
__opts__
[
'decoder'
]
||
'default'
].
decode_buff
(
ret
[
'buff'
]
,
ext
)
});
})
// HTTP请求返回字节流
...
...
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