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
0cc3f0d3
Commit
0cc3f0d3
authored
Mar 04, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance: Chunked) 分块传输自动根据黑名单字符(eg: eval, assert, execute, response 等)进行随机切割(thx @phith0n)
parent
a5cbe4c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
CHANGELOG.md
CHANGELOG.md
+6
-0
request.js
modules/request.js
+9
-1
No files found.
CHANGELOG.md
View file @
0cc3f0d3
...
...
@@ -2,6 +2,12 @@
> 有空会补补BUG、添添新功能。
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
## `v(2.0.6-dev)`
### 后端模块
*
分块传输自动根据黑名单字符(eg: eval, assert, execute, response 等)进行随机切割(thx @phith0n)
## 2019/03/04 `v(2.0.5)`
### 后端模块
...
...
modules/request.js
View file @
0cc3f0d3
...
...
@@ -450,11 +450,19 @@ class AntRead extends Readable {
// 重写自定义的可读流的 _read 方法
_read
()
{
let
blakwords
=
/eval|assert|base64_decode|preg_replace|call_user_func|create_function|str_replace|array_map|system|popen|exec|function_exists|passthru|shell_exec|frombase64string|unsafe|response|execute/i
;
let
step
=
this
.
randomNum
(
this
.
o
.
step
,
this
.
o
.
stepmax
);
if
(
this
.
index
>=
this
.
chunk
.
length
)
{
this
.
push
(
null
);
}
else
{
this
.
push
(
this
.
chunk
.
substring
(
this
.
index
,
this
.
index
+
step
)
+
""
);
let
_subcode
=
this
.
chunk
.
substring
(
this
.
index
,
this
.
index
+
step
)
+
""
;
let
m
=
_subcode
.
match
(
blakwords
);
if
(
m
)
{
let
sub_step
=
this
.
randomNum
(
1
,
m
[
0
].
length
-
1
);
_subcode
=
_subcode
.
substring
(
0
,
m
.
index
+
sub_step
);
step
=
m
.
index
+
sub_step
;
}
this
.
push
(
_subcode
);
}
this
.
index
+=
step
;
}
...
...
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