Commit 6c96d5bf by 钱炳权

aflnet全流程无问题

parent f60354b1
...@@ -7,7 +7,6 @@ import java.util.Date; ...@@ -7,7 +7,6 @@ import java.util.Date;
@Data @Data
public class MissionInfo { public class MissionInfo {
@JsonIgnore
private int id; private int id;
@JsonIgnore @JsonIgnore
private int tableId;//返回数据忽略字段;aflnet 为1 kitty为2 private int tableId;//返回数据忽略字段;aflnet 为1 kitty为2
......
...@@ -79,9 +79,9 @@ public class FuzzLogServiceImpl implements FuzzLogService { ...@@ -79,9 +79,9 @@ public class FuzzLogServiceImpl implements FuzzLogService {
@Transactional(rollbackFor = MysqlException.class) @Transactional(rollbackFor = MysqlException.class)
public List<FuzzLogTransEntity> downloadAflnetFile(MissionInfo missionInfo) { public List<FuzzLogTransEntity> downloadAflnetFile(MissionInfo missionInfo) {
List<FuzzLogTransEntity> fuzzLogList = new ArrayList<FuzzLogTransEntity>(); List<FuzzLogTransEntity> fuzzLogList = new ArrayList<FuzzLogTransEntity>();
// AflnetResult aflnetResult = aflnetMapper.selectResultById(missionInfo.getMissionId()); AflnetResult aflnetResult = aflnetMapper.selectResultById(missionInfo.getId());
// FuzzLogTransEntity fuzzLogTransEntity = new FuzzLogTransEntity(aflnetResult.getFile(), aflnetResult.getFileName()); FuzzLogTransEntity fuzzLogTransEntity = new FuzzLogTransEntity(aflnetResult.getFile(), aflnetResult.getFileName());
// fuzzLogList.add(fuzzLogTransEntity); fuzzLogList.add(fuzzLogTransEntity);
return fuzzLogList; return fuzzLogList;
} }
} }
...@@ -15,6 +15,7 @@ import com.example.fuzzControll.tools.system.SystemRunningParams; ...@@ -15,6 +15,7 @@ import com.example.fuzzControll.tools.system.SystemRunningParams;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import java.io.*; import java.io.*;
...@@ -275,12 +276,12 @@ public class TestCmdTools { ...@@ -275,12 +276,12 @@ public class TestCmdTools {
* @return * @return
*/ */
private TestReturnEntity makeReturnEntity(String line, TestReturnEntity returnEntity) { 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")) { if (line.contains("All set and ready to roll!") || line.contains("american fuzzy") || line.contains("process timing overall results")) {
// show = false; show = false;
// } else if (line.contains("PROGRAM ABORT")) { } else if (line.contains("PROGRAM ABORT")) {
// log.error("Aflnet run failed !"); log.error("Aflnet run failed !");
// throw new AflnetException(""); throw new AflnetException("");
// } }
if (show) { if (show) {
log.info(line); log.info(line);
} }
...@@ -397,7 +398,7 @@ public class TestCmdTools { ...@@ -397,7 +398,7 @@ public class TestCmdTools {
if (cmdStartParams.getWaiting() != 0) { if (cmdStartParams.getWaiting() != 0) {
cmd.append(" -D " + cmdStartParams.getWaiting() + " "); cmd.append(" -D " + cmdStartParams.getWaiting() + " ");
} }
if (cmdStartParams.getNsname() != "") { if (!StringUtils.isEmpty(cmdStartParams.getNsname())) {
cmd.append(" -e " + cmdStartParams.getNsname() + " "); cmd.append(" -e " + cmdStartParams.getNsname() + " ");
} }
if (cmdStartParams.getKill()) { if (cmdStartParams.getKill()) {
...@@ -412,7 +413,7 @@ public class TestCmdTools { ...@@ -412,7 +413,7 @@ public class TestCmdTools {
if (cmdStartParams.getFalseNegativeMode()) { if (cmdStartParams.getFalseNegativeMode()) {
cmd.append(" -F " + " "); cmd.append(" -F " + " ");
} }
if (cmdStartParams.getScript() != "") { if (!StringUtils.isEmpty(cmdStartParams.getScript())) {
cmd.append(" -c " + cmdStartParams.getScript() + " "); cmd.append(" -c " + cmdStartParams.getScript() + " ");
} }
if (cmdStartParams.getStateSelectionAlgo() != 0) { if (cmdStartParams.getStateSelectionAlgo() != 0) {
......
...@@ -20,6 +20,8 @@ public class TestMissionController { ...@@ -20,6 +20,8 @@ public class TestMissionController {
*/ */
@RequestMapping(value = "/startmission", method = RequestMethod.GET) @RequestMapping(value = "/startmission", method = RequestMethod.GET)
public AjaxResult getAll(@RequestParam int id) { public AjaxResult getAll(@RequestParam int id) {
//todo 这个在kitty启动时并不需要
fuzzIntegrationFileApi.connect();
return fuzzIntegrationFileApi.startmission(id); return fuzzIntegrationFileApi.startmission(id);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment