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
6c96d5bf
Commit
6c96d5bf
authored
Aug 21, 2024
by
钱炳权
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aflnet全流程无问题
parent
f60354b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
MissionInfo.java
.../java/com/example/fuzzControll/domain/po/MissionInfo.java
+0
-1
FuzzLogServiceImpl.java
...example/fuzzControll/service/impl/FuzzLogServiceImpl.java
+3
-3
TestCmdTools.java
...ava/com/example/fuzzControll/tools/test/TestCmdTools.java
+9
-8
TestMissionController.java
...e/fuzzbackendmaster/controller/TestMissionController.java
+2
-0
No files found.
fuzzIntegration/src/main/java/com/example/fuzzControll/domain/po/MissionInfo.java
View file @
6c96d5bf
...
...
@@ -7,7 +7,6 @@ import java.util.Date;
@Data
public
class
MissionInfo
{
@JsonIgnore
private
int
id
;
@JsonIgnore
private
int
tableId
;
//返回数据忽略字段;aflnet 为1 kitty为2
...
...
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/FuzzLogServiceImpl.java
View file @
6c96d5bf
...
...
@@ -79,9 +79,9 @@ public class FuzzLogServiceImpl implements FuzzLogService {
@Transactional
(
rollbackFor
=
MysqlException
.
class
)
public
List
<
FuzzLogTransEntity
>
downloadAflnetFile
(
MissionInfo
missionInfo
)
{
List
<
FuzzLogTransEntity
>
fuzzLogList
=
new
ArrayList
<
FuzzLogTransEntity
>();
// AflnetResult aflnetResult = aflnetMapper.selectResultById(missionInfo.getMission
Id());
//
FuzzLogTransEntity fuzzLogTransEntity = new FuzzLogTransEntity(aflnetResult.getFile(), aflnetResult.getFileName());
//
fuzzLogList.add(fuzzLogTransEntity);
AflnetResult
aflnetResult
=
aflnetMapper
.
selectResultById
(
missionInfo
.
get
Id
());
FuzzLogTransEntity
fuzzLogTransEntity
=
new
FuzzLogTransEntity
(
aflnetResult
.
getFile
(),
aflnetResult
.
getFileName
());
fuzzLogList
.
add
(
fuzzLogTransEntity
);
return
fuzzLogList
;
}
}
fuzzIntegration/src/main/java/com/example/fuzzControll/tools/test/TestCmdTools.java
View file @
6c96d5bf
...
...
@@ -15,6 +15,7 @@ import com.example.fuzzControll.tools.system.SystemRunningParams;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
java.io.*
;
...
...
@@ -275,12 +276,12 @@ public class TestCmdTools {
* @return
*/
private
TestReturnEntity
makeReturnEntity
(
String
line
,
TestReturnEntity
returnEntity
)
{
//
if (line.contains("All set and ready to roll!") || line.contains("american fuzzy") || line.contains("process timing overall results")) {
//
show = false;
//
} else if (line.contains("PROGRAM ABORT")) {
//
log.error("Aflnet run failed !");
//
throw new AflnetException("");
//
}
if
(
line
.
contains
(
"All set and ready to roll!"
)
||
line
.
contains
(
"american fuzzy"
)
||
line
.
contains
(
"process timing overall results"
))
{
show
=
false
;
}
else
if
(
line
.
contains
(
"PROGRAM ABORT"
))
{
log
.
error
(
"Aflnet run failed !"
);
throw
new
AflnetException
(
""
);
}
if
(
show
)
{
log
.
info
(
line
);
}
...
...
@@ -397,7 +398,7 @@ public class TestCmdTools {
if
(
cmdStartParams
.
getWaiting
()
!=
0
)
{
cmd
.
append
(
" -D "
+
cmdStartParams
.
getWaiting
()
+
" "
);
}
if
(
cmdStartParams
.
getNsname
()
!=
""
)
{
if
(
!
StringUtils
.
isEmpty
(
cmdStartParams
.
getNsname
())
)
{
cmd
.
append
(
" -e "
+
cmdStartParams
.
getNsname
()
+
" "
);
}
if
(
cmdStartParams
.
getKill
())
{
...
...
@@ -412,7 +413,7 @@ public class TestCmdTools {
if
(
cmdStartParams
.
getFalseNegativeMode
())
{
cmd
.
append
(
" -F "
+
" "
);
}
if
(
cmdStartParams
.
getScript
()
!=
""
)
{
if
(
!
StringUtils
.
isEmpty
(
cmdStartParams
.
getScript
())
)
{
cmd
.
append
(
" -c "
+
cmdStartParams
.
getScript
()
+
" "
);
}
if
(
cmdStartParams
.
getStateSelectionAlgo
()
!=
0
)
{
...
...
fuzzbackendmaster/src/main/java/com/example/fuzzbackendmaster/controller/TestMissionController.java
View file @
6c96d5bf
...
...
@@ -20,6 +20,8 @@ public class TestMissionController {
*/
@RequestMapping
(
value
=
"/startmission"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getAll
(
@RequestParam
int
id
)
{
//todo 这个在kitty启动时并不需要
fuzzIntegrationFileApi
.
connect
();
return
fuzzIntegrationFileApi
.
startmission
(
id
);
}
/**
...
...
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