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
5e9e6722
Commit
5e9e6722
authored
Sep 03, 2019
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance: Core) 调整默认生成变量名规则
parent
7caef68e
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
129 additions
and
60 deletions
+129
-60
CHANGELOG.md
CHANGELOG.md
+27
-1
package.json
package.json
+1
-1
app.entry.js
source/app.entry.js
+1
-0
utils.js
source/base/utils.js
+34
-0
words.js
source/base/words.js
+40
-40
base64.js
source/core/aspx/encoder/base64.js
+6
-4
hex.js
source/core/aspx/encoder/hex.js
+6
-4
base.js
source/core/base.js
+2
-2
base64.js
source/core/php/encoder/base64.js
+6
-4
rot13.js
source/core/php/encoder/rot13.js
+6
-4
No files found.
CHANGELOG.md
View file @
5e9e6722
...
...
@@ -4,9 +4,35 @@
## `v(2.1.6)`
### 后端模块
*
修复数据截取 Bug
### 核心模块
*
数据分割字符随机化增强(随机内容,随机长度 5~12 位)
*
数据分割字符随机化增强(随机内容, 随机长度 5~12 位), 避免客户端发包产生固定的
`Content-Length`
*
新增
`antSword["RANDOMWORDS"]`
全局变量, 存放英文单词, 如需要定制字典请修改
`source/base/word.js`
*
新增
`antSword["utils"]`
全局变量, 包函
`RandomChoice`
,
`RandomLowercase`
函数
*
发包随机变量名去除
`_0x`
通用变量前缀
*
核心模版发包键名支持随机英文单词
### Shell 管理
*
新增「使用随机英文单词变量」配置项, 在发包时非密码变量名会使用随机产生的英文单词 (thx @Ch1ngg)

未勾选此配置项时, 发包变量名如下:

勾选此项设置后, 发包变量名如下:

*
新增常用插件功能面板, 可自定义配置常用插件到此面板, 快速调用

### 其它
...
...
package.json
View file @
5e9e6722
{
"name"
:
"antsword"
,
"version"
:
"2.1.5"
,
"version"
:
"2.1.5
.1
"
,
"description"
:
"中国蚁剑是一款跨平台的开源网站管理工具"
,
"main"
:
"app.js"
,
"dependencies"
:
{
...
...
source/app.entry.js
View file @
5e9e6722
...
...
@@ -280,6 +280,7 @@ antSword['CacheManager'] = CacheManager;
antSword
[
'Decodes'
]
=
new
Decodes
();
antSword
[
'menubar'
]
=
new
Menubar
();
antSword
[
'RANDOMWORDS'
]
=
require
(
'./base/words'
);
antSword
[
'utils'
]
=
require
(
'./base/utils'
);
antSword
[
'package'
]
=
require
(
'../package'
);
// 加载模块列表
...
...
source/base/utils.js
0 → 100644
View file @
5e9e6722
'use strict'
;
/**
* 随机从列表返回指定长度的列表
* @param {array} array 待选列表
* @param {array} excludes 排除列表
* @param {int} len 返回的长度,默认 6
*/
function
RandomChoice
(
array
,
excludes
=
[],
len
=
1
)
{
var
tmp
=
[];
while
(
tmp
.
length
<
len
)
{
let
v
=
array
[
Math
.
ceil
(
Math
.
random
()
*
array
.
length
-
1
)];
excludes
.
indexOf
(
v
)
===
-
1
&&
tmp
.
indexOf
(
v
)
===
-
1
&&
tmp
.
push
(
v
);
}
return
tmp
;
}
/**
* 随机生成小写字母
* @param {int} len 长度,默认1
*/
function
RandomLowercase
(
len
=
1
)
{
var
result
=
[];
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
var
ranNum
=
Math
.
ceil
(
Math
.
random
()
*
25
);
//生成一个0到25的数字
result
.
push
(
String
.
fromCharCode
(
97
+
ranNum
));
}
return
result
.
join
(
''
);
}
module
.
exports
=
{
RandomChoice
,
RandomLowercase
,
};
\ No newline at end of file
source/base/words.js
View file @
5e9e6722
...
...
@@ -56,20 +56,20 @@ const RANDOMWORDS = [
"bookkeeping"
,
"boolean"
,
"border"
,
"bottom
-
up"
,
"bottom
_
up"
,
"bound"
,
"bounds"
,
"box"
,
"brace"
,
"bracket"
,
"branch"
,
"breadth
-
first"
,
"breadth
_
first"
,
"breakpoint"
,
"brevity"
,
"buffer"
,
"bug"
,
"building"
,
"built
-
in"
,
"built
_
in"
,
"byte"
,
"bytecode"
,
"cache"
,
...
...
@@ -96,9 +96,9 @@ const RANDOMWORDS = [
"code"
,
"collection"
,
"column"
,
"column
-
major"
,
"column
_
major"
,
"comma"
,
"command
-
line"
,
"command
_
line"
,
"Common"
,
"compatible"
,
"compilation"
,
...
...
@@ -129,7 +129,7 @@ const RANDOMWORDS = [
"constant"
,
"constraint"
,
"container"
,
"content
-
based"
,
"content
_
based"
,
"context"
,
"continuation"
,
"continuous"
,
...
...
@@ -151,7 +151,7 @@ const RANDOMWORDS = [
"dangling"
,
"data"
,
"database"
,
"data
-
driven"
,
"data
_
driven"
,
"datagram"
,
"dead"
,
"debug"
,
...
...
@@ -174,7 +174,7 @@ const RANDOMWORDS = [
"dellocate"
,
"demarshal"
,
"deprecated"
,
"depth
-
first"
,
"depth
_
first"
,
"derived"
,
"design"
,
"designator"
,
...
...
@@ -190,7 +190,7 @@ const RANDOMWORDS = [
"DLL"
,
"document"
,
"dotted"
,
"dotted
-
pair"
,
"dotted
_
pair"
,
"duplicate"
,
"dynamic"
,
"effect"
,
...
...
@@ -210,7 +210,7 @@ const RANDOMWORDS = [
"equation"
,
"equivalence"
,
"error"
,
"error
-
checking"
,
"error
_
checking"
,
"escape"
,
"escaped"
,
"evaluate"
,
...
...
@@ -235,15 +235,15 @@ const RANDOMWORDS = [
"field"
,
"file"
,
"fill"
,
"fineo
-
grained"
,
"fineo
_
grained"
,
"firmware"
,
"first
-
class"
,
"fixed
-
point"
,
"first
_
class"
,
"fixed
_
point"
,
"fixnum"
,
"flag"
,
"flash"
,
"flexibility"
,
"floating
-
point"
,
"floating
_
point"
,
"flush"
,
"fold"
,
"font"
,
...
...
@@ -275,14 +275,14 @@ const RANDOMWORDS = [
"handle"
,
"hard"
,
"hardware"
,
"hard
-
wire"
,
"hard
_
wire"
,
"hash"
,
"header"
,
"heap"
,
"helper"
,
"heuristic"
,
"higher
-
order"
,
"high
-
order"
,
"higher
_
order"
,
"high
_
order"
,
"hyperlink"
,
"HyperText"
,
"identical"
,
...
...
@@ -325,7 +325,7 @@ const RANDOMWORDS = [
"interpolation"
,
"interpret"
,
"interpreter"
,
"inter
-
process"
,
"inter
_
process"
,
"interrupt"
,
"intersection"
,
"invariants"
,
...
...
@@ -380,10 +380,10 @@ const RANDOMWORDS = [
"memory"
,
"menu"
,
"message"
,
"message
-
passing"
,
"meta
-
"
,
"message
_
passing"
,
"meta
_
"
,
"metacircular"
,
"meta
-
programming"
,
"meta
_
programming"
,
"method"
,
"micro"
,
"middleware"
,
...
...
@@ -401,7 +401,7 @@ const RANDOMWORDS = [
"monomorphic"
,
"mouse"
,
"multiple"
,
"multi
-
task"
,
"multi
_
task"
,
"mutable"
,
"mutex"
,
"namespace"
,
...
...
@@ -412,11 +412,11 @@ const RANDOMWORDS = [
"newline"
,
"nondeclarative"
,
"nondestructive"
,
"non
-
deterministic"
,
"non
-
strict"
,
"non
_
deterministic"
,
"non
_
strict"
,
"number"
,
"object"
,
"object
-
oriented"
,
"object
_
oriented"
,
"on"
,
"online"
,
"open"
,
...
...
@@ -440,7 +440,7 @@ const RANDOMWORDS = [
"parallel"
,
"param"
,
"parameter"
,
"paren
-
matching"
,
"paren
_
matching"
,
"parent"
,
"parentheses"
,
"parse"
,
...
...
@@ -452,7 +452,7 @@ const RANDOMWORDS = [
"pattern"
,
"perform"
,
"performance"
,
"performance
-
critical"
,
"performance
_
critical"
,
"persistence"
,
"phrenology"
,
"physical"
,
...
...
@@ -520,8 +520,8 @@ const RANDOMWORDS = [
"rational"
,
"raw"
,
"read"
,
"read
-evaluate-
print"
,
"read
-
macro"
,
"read
_evaluate_
print"
,
"read
_
macro"
,
"record"
,
"recursion"
,
"recursive"
,
...
...
@@ -549,10 +549,10 @@ const RANDOMWORDS = [
"robustness"
,
"routine"
,
"routing"
,
"row
-
major"
,
"run
-
length"
,
"row
_
major"
,
"run
_
length"
,
"runtime"
,
"run
-
time"
,
"run
_
time"
,
"rvalue"
,
"save"
,
"scaffold"
,
...
...
@@ -576,10 +576,10 @@ const RANDOMWORDS = [
"serialization"
,
"series"
,
"server"
,
"S
-
expression"
,
"S
_
expression"
,
"shadowing"
,
"sharp"
,
"sharp
-
quote"
,
"sharp
_
quote"
,
"shortest"
,
"SICP"
,
"side"
,
...
...
@@ -587,7 +587,7 @@ const RANDOMWORDS = [
"simple"
,
"simulate"
,
"Single"
,
"single
-
segment"
,
"single
_
segment"
,
"sketch"
,
"slash"
,
"slot"
,
...
...
@@ -641,8 +641,8 @@ const RANDOMWORDS = [
"system"
,
"table"
,
"tag"
,
"tail
-
recursion"
,
"tail
-
recursive"
,
"tail
_
recursion"
,
"tail
_
recursive"
,
"TAOCP"
,
"target"
,
"taxable"
,
...
...
@@ -652,13 +652,13 @@ const RANDOMWORDS = [
"testing"
,
"text"
,
"thread"
,
"three
-
valued"
,
"three
_
valued"
,
"throw"
,
"throwaway"
,
"timestamp"
,
"token"
,
"top
-
down"
,
"top
-
level"
,
"top
_
down"
,
"top
_
level"
,
"trace"
,
"trailing"
,
"transaction"
,
...
...
source/core/aspx/encoder/base64.js
View file @
5e9e6722
...
...
@@ -7,10 +7,12 @@
'use strict'
;
module
.
exports
=
(
pwd
,
data
,
ext
=
null
)
=>
{
let
randomID
=
`_0x
${
Math
.
random
()
.
toString
(
16
)
.
substr
(
2
)}
`
;
let
randomID
;
if
(
ext
.
opts
.
otherConf
[
'use-random-variable'
]
===
1
)
{
randomID
=
antSword
.
utils
.
RandomChoice
(
antSword
[
'RANDOMWORDS'
]);
}
else
{
randomID
=
`
${
antSword
[
'utils'
].
RandomLowercase
()}${
Math
.
random
().
toString
(
16
).
substr
(
2
)}
`
;
}
data
[
randomID
]
=
Buffer
.
from
(
data
[
'_'
])
.
toString
(
'base64'
);
...
...
source/core/aspx/encoder/hex.js
View file @
5e9e6722
...
...
@@ -7,10 +7,12 @@
'use strict'
;
module
.
exports
=
(
pwd
,
data
,
ext
=
null
)
=>
{
let
randomID
=
`_0x
${
Math
.
random
()
.
toString
(
16
)
.
substr
(
2
)}
`
;
let
randomID
;
if
(
ext
.
opts
.
otherConf
[
'use-random-variable'
]
===
1
)
{
randomID
=
antSword
.
utils
.
RandomChoice
(
antSword
[
'RANDOMWORDS'
]);
}
else
{
randomID
=
`
${
antSword
[
'utils'
].
RandomLowercase
()}${
Math
.
random
().
toString
(
16
).
substr
(
2
)}
`
;
}
let
hexencoder
=
"function HexAsciiConvert(hex:String) {var sb:System.Text.StringBuilder = new Sys"
+
"tem.Text.StringBuilder();var i;for(i=0; i< hex.Length; i+=2){sb.Append(System.Co"
+
"nvert.ToString(System.Convert.ToChar(Int32.Parse(hex.Substring(i,2), System.Glob"
+
...
...
source/core/base.js
View file @
5e9e6722
...
...
@@ -109,9 +109,9 @@ class Base {
if
(
this
.
__opts__
.
otherConf
[
"use-random-variable"
]
==
1
)
{
// 随机返回单词, 排除 body 和 pwd
let
excludes
=
Object
.
keys
(
this
.
__opts__
.
httpConf
.
body
).
concat
(
this
.
__opts__
.
pwd
);
return
this
.
getRandomVariabl
e
(
antSword
[
'RANDOMWORDS'
],
excludes
,
6
);
return
antSword
[
'utils'
].
RandomChoic
e
(
antSword
[
'RANDOMWORDS'
],
excludes
,
6
);
}
else
{
random
=
()
=>
`
${(
Math
.
random
()
+
Math
.
random
()).
toString
(
16
).
substr
(
2
)}
`
;
// 返回六个随机变量名数组
random
=
()
=>
`
${
antSword
[
'utils'
].
RandomLowercase
()}${
(
Math
.
random
()
+
Math
.
random
()).
toString
(
16
).
substr
(
2
)}
`
;
// 返回六个随机变量名数组
return
[
random
(),
random
(),
...
...
source/core/php/encoder/base64.js
View file @
5e9e6722
...
...
@@ -7,10 +7,12 @@
module
.
exports
=
(
pwd
,
data
,
ext
=
null
)
=>
{
// 生成一个随机变量名
let
randomID
=
`_0x
${
Math
.
random
()
.
toString
(
16
)
.
substr
(
2
)}
`
;
let
randomID
;
if
(
ext
.
opts
.
otherConf
[
'use-random-variable'
]
===
1
)
{
randomID
=
antSword
.
utils
.
RandomChoice
(
antSword
[
'RANDOMWORDS'
]);
}
else
{
randomID
=
`
${
antSword
[
'utils'
].
RandomLowercase
()}${
Math
.
random
().
toString
(
16
).
substr
(
2
)}
`
;
}
data
[
randomID
]
=
Buffer
.
from
(
data
[
'_'
])
.
toString
(
'base64'
);
...
...
source/core/php/encoder/rot13.js
View file @
5e9e6722
...
...
@@ -20,10 +20,12 @@ module.exports = (pwd, data, ext = null) => {
}
// 生成一个随机变量名
let
randomID
=
`_0x
${
Math
.
random
()
.
toString
(
16
)
.
substr
(
2
)}
`
;
let
randomID
;
if
(
ext
.
opts
.
otherConf
[
'use-random-variable'
]
===
1
)
{
randomID
=
antSword
.
utils
.
RandomChoice
(
antSword
[
'RANDOMWORDS'
]);
}
else
{
randomID
=
`
${
antSword
[
'utils'
].
RandomLowercase
()}${
Math
.
random
().
toString
(
16
).
substr
(
2
)}
`
;
}
data
[
randomID
]
=
encode
(
data
[
'_'
]);
data
[
pwd
]
=
`@eval(@str_rot13($_POST[
${
randomID
}
]));`
;
delete
data
[
'_'
];
...
...
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