Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fuzzBackEnd
Overview
Overview
Details
Activity
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
钱炳权
fuzzBackEnd
Commits
011347e6
Commit
011347e6
authored
Apr 29, 2024
by
钱炳权
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目分离成功,可以成功跑通所有测试
parent
71336f1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
CmdConstent.java
.../java/com/example/fuzzControll/constents/CmdConstent.java
+3
-3
TestServiceImpl.java
...om/example/fuzzControll/service/impl/TestServiceImpl.java
+9
-2
No files found.
fuzzIntegration/src/main/java/com/example/fuzzControll/constents/CmdConstent.java
View file @
011347e6
...
...
@@ -4,13 +4,13 @@ import com.example.fuzzControll.conf.SpringContextUtil;
import
com.example.fuzzControll.conf.KittyProperties
;
public
class
CmdConstent
{
static
KittyProperties
kittyProperties
=
(
KittyProperties
)
SpringContextUtil
.
getBean
(
"kittyProperties"
);
static
KittyProperties
kittyProperties
=
(
KittyProperties
)
SpringContextUtil
.
getBean
(
"kittyProperties"
);
public
static
final
String
GET_FILE_NAME
=
"ls -h "
;
public
static
final
String
DELETE_FILE
=
"rm -r "
;
public
static
final
String
COUNT_FILE
=
"ls -l | grep \"^-\" | wc -l"
;
public
static
final
String
COUNT_DIR
=
"ls -l | grep \"^d\" | wc -l"
;
public
static
final
String
RUN_AFLNET
=
"afl-fuzz -d -i "
+
kittyProperties
.
getAflnetPath
()+
"aflnet/tutorials/live555/in-rtsp -o out-live8 "
+
"-x "
+
kittyProperties
.
getAflnetPath
()+
"aflnet/tutorials/live555/rtsp.dict "
;
public
static
final
String
RUN_AFLNET
_BEFORE
=
"afl-fuzz -d -i "
+
kittyProperties
.
getAflnetPath
()
+
"aflnet/tutorials/live555/in-rtsp -o "
;
public
static
final
String
RUN_AFLNET_AFTER
=
" -x "
+
kittyProperties
.
getAflnetPath
()
+
"aflnet/tutorials/live555/rtsp.dict "
;
public
static
final
String
RUN_PING
=
"ping www.baidu.com"
;
...
...
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/TestServiceImpl.java
View file @
011347e6
...
...
@@ -12,6 +12,9 @@ import com.example.fuzzControll.tools.TestControlTools;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.concurrent.CountDownLatch
;
@Service
(
"testService"
)
...
...
@@ -23,10 +26,14 @@ public class TestServiceImpl implements TestService {
//todo 不同服务不同端口
@Override
public
void
testStart
(
CmdStartParams
cmdStartParams
)
throws
AflnetException
,
CmdException
{
public
void
testStart
(
CmdStartParams
cmdStartParams
)
throws
AflnetException
,
CmdException
{
TestControlTools
.
setIsRunning
(
true
);
String
cmd
=
cmdTools
.
parse
(
cmdStartParams
);
String
finalCmd
=
CmdConstent
.
RUN_AFLNET
+
cmd
+
kittyProperties
.
getAflnetPath
()+
"live555/testProgs/testOnDemandRTSPServer 8554"
;
Date
date
=
new
Date
();
DateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd-hh-mm-ss-"
);
String
outputPathName
=
df
.
format
(
date
)+
cmdStartParams
.
getProtopcol
()+
"-output"
;
String
finalCmd
=
CmdConstent
.
RUN_AFLNET_BEFORE
+
outputPathName
+
CmdConstent
.
RUN_AFLNET_AFTER
+
cmd
+
kittyProperties
.
getAflnetPath
()
+
"live555/testProgs/testOnDemandRTSPServer 8554"
;
log
.
info
(
"The cmd is [{}]"
,
finalCmd
);
cmdTools
.
runProgramCmd
(
finalCmd
);
}
...
...
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