重构目录结构
5
Makefile
|
@ -32,7 +32,8 @@ PRO_TOP_DIR = $(shell pwd)
|
|||
|
||||
BUILD_DIR = ${PRO_TOP_DIR}/build
|
||||
|
||||
SRC_BIN_DIR = ${PRO_TOP_DIR}/bin
|
||||
SRC_DIR = ${PRO_TOP_DIR}/src
|
||||
BIN_DIR = ${PRO_TOP_DIR}/bin
|
||||
|
||||
# TODO: make it can configurable
|
||||
MAKE = make
|
||||
|
@ -84,7 +85,7 @@ GENMAI_DIR= ${PRO_TOP_DIR}/genmai
|
|||
|
||||
genmai-build: pre-build
|
||||
@echo ">"
|
||||
go build -o ${BUILD_DIR}
|
||||
cd ${SRC_DIR} && go build -o ${BUILD_DIR}
|
||||
|
||||
genmai-clean:
|
||||
@echo ">"
|
||||
|
|
14
logfile
|
@ -2,3 +2,17 @@
|
|||
2022/11/16 17:41:37 检测为liunx系统
|
||||
2022/11/16 17:41:37 frameWork sure
|
||||
2022/11/16 17:41:37 ssh connect succ
|
||||
2022/11/16 18:05:23 检测为liunx系统
|
||||
2022/11/16 18:05:23 frameWork sure
|
||||
2022/11/16 21:27:32 检测为liunx系统
|
||||
2022/11/16 21:27:32 frameWork sure
|
||||
2022/11/16 21:27:49 检测为liunx系统
|
||||
2022/11/16 21:27:49 frameWork sure
|
||||
2022/11/16 21:28:02 检测为liunx系统
|
||||
2022/11/16 21:28:02 frameWork sure
|
||||
2022/11/16 21:37:56 检测为liunx系统
|
||||
2022/11/16 21:37:56 frameWork sure
|
||||
2022/11/16 21:41:19 检测为liunx系统
|
||||
2022/11/16 21:41:19 frameWork sure
|
||||
2022/11/16 21:48:49 检测为liunx系统
|
||||
2022/11/16 21:48:49 frameWork sure
|
||||
|
|
|
@ -3,8 +3,8 @@ package ArgParser
|
|||
import(
|
||||
"flag"
|
||||
"fmt"
|
||||
"main/src/genmai/Pool"
|
||||
"main/src/genmai/RemoteCheck"
|
||||
"main/genmai/Pool"
|
||||
"main/genmai/RemoteCheck"
|
||||
"strings"
|
||||
"strconv"
|
||||
"log"
|
||||
|
|
|
@ -37,7 +37,7 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
sandbox "main/src/genmai/Sandbox"
|
||||
sandbox "main/genmai/Sandbox"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -34,7 +34,7 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
sandbox "main/src/genmai/Sandbox"
|
||||
sandbox "main/genmai/Sandbox"
|
||||
)
|
||||
|
||||
type ExplorerConfigDBus struct {
|
||||
|
|
|
@ -39,13 +39,13 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
sandbox "main/src/genmai/Sandbox"
|
||||
sandbox "main/genmai/Sandbox"
|
||||
// TODO:
|
||||
// 应该写成相对路径,因为genmai应该是编译成库,所以包路径不
|
||||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
inter "main/src/genmai/Interpreter"
|
||||
inter "main/genmai/Interpreter"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -36,7 +36,7 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
sandbox "main/src/genmai/Sandbox"
|
||||
sandbox "main/genmai/Sandbox"
|
||||
)
|
||||
|
||||
type ExplorerConfigSystem struct {
|
||||
|
|
|
@ -34,7 +34,7 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
sandbox "main/src/genmai/Sandbox"
|
||||
sandbox "main/genmai/Sandbox"
|
||||
)
|
||||
|
||||
type ExplorerConfigWeb struct {
|
||||
|
|
|
@ -34,7 +34,7 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
inter "main/src/genmai/Interpreter"
|
||||
inter "main/genmai/Interpreter"
|
||||
)
|
||||
|
||||
// 继承于Interpreter接口
|
||||
|
|
|
@ -40,7 +40,7 @@ import (
|
|||
// 是以main开头。
|
||||
//
|
||||
// go 有点拉
|
||||
inter "main/src/genmai/Interpreter"
|
||||
inter "main/genmai/Interpreter"
|
||||
)
|
||||
|
||||
// 继承与SandBoxBase接口
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"main/src/genmai/ArgParser"
|
||||
"main/src/genmai/FrameWorkCheck"
|
||||
"main/genmai/ArgParser"
|
||||
"main/genmai/FrameWorkCheck"
|
||||
"fmt"
|
||||
"flag"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
genmai "main/src/genmai"
|
||||
genmai "main/genmai"
|
||||
)
|
||||
type Vul struct{
|
||||
ParserNum int //协程数
|
||||
|
@ -88,7 +88,7 @@ func main(){
|
|||
return
|
||||
|
||||
///////////////////////////////
|
||||
// test "main/src/genmai"
|
||||
// test "main/genmai"
|
||||
genmai.Test()
|
||||
// config := genmai.NewConfig()
|
||||
fmt.Println(">>")
|
|
@ -68,7 +68,7 @@ func main() {
|
|||
go getResult(done)
|
||||
go allocate(numOfTasks)
|
||||
go createWorkerPool(numOfWorkers)
|
||||
// 必须在allocate()和getResult()之后创建工作池
|
||||
必须在allocate()和getResult()之后创建工作池
|
||||
<-done
|
||||
endTime := time.Now()
|
||||
diff := endTime.Sub(startTime)
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |