diff --git a/Makefile b/Makefile index 6626eaa..724f4c8 100644 --- a/Makefile +++ b/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 ">" diff --git a/logfile b/logfile index 03945d5..a7637db 100644 --- a/logfile +++ b/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 diff --git a/src/genmai/ArgParser/ParameterParser.go b/src/genmai/ArgParser/ParameterParser.go index 6b509b9..e1241aa 100644 --- a/src/genmai/ArgParser/ParameterParser.go +++ b/src/genmai/ArgParser/ParameterParser.go @@ -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" @@ -164,4 +164,4 @@ func RemoteArgParser(SSHHost string,SSHUser string,SSHPassword string)(checkResu } } return checkResult -} \ No newline at end of file +} diff --git a/src/genmai/Doctor.go b/src/genmai/Doctor.go index e4d3cfe..27b92ac 100644 --- a/src/genmai/Doctor.go +++ b/src/genmai/Doctor.go @@ -37,7 +37,7 @@ import ( // 是以main开头。 // // go 有点拉 - sandbox "main/src/genmai/Sandbox" + sandbox "main/genmai/Sandbox" ) const ( diff --git a/src/genmai/ExplorerDBus.go b/src/genmai/ExplorerDBus.go index 37a066f..4be64c5 100644 --- a/src/genmai/ExplorerDBus.go +++ b/src/genmai/ExplorerDBus.go @@ -34,7 +34,7 @@ import ( // 是以main开头。 // // go 有点拉 - sandbox "main/src/genmai/Sandbox" + sandbox "main/genmai/Sandbox" ) type ExplorerConfigDBus struct { diff --git a/src/genmai/ExplorerKernel.go b/src/genmai/ExplorerKernel.go index 7b46eda..e98b41e 100644 --- a/src/genmai/ExplorerKernel.go +++ b/src/genmai/ExplorerKernel.go @@ -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 ( diff --git a/src/genmai/ExplorerSystem.go b/src/genmai/ExplorerSystem.go index f8c984f..4786a19 100644 --- a/src/genmai/ExplorerSystem.go +++ b/src/genmai/ExplorerSystem.go @@ -36,7 +36,7 @@ import ( // 是以main开头。 // // go 有点拉 - sandbox "main/src/genmai/Sandbox" + sandbox "main/genmai/Sandbox" ) type ExplorerConfigSystem struct { diff --git a/src/genmai/ExplorerWeb.go b/src/genmai/ExplorerWeb.go index 86652a8..cab73c5 100644 --- a/src/genmai/ExplorerWeb.go +++ b/src/genmai/ExplorerWeb.go @@ -34,7 +34,7 @@ import ( // 是以main开头。 // // go 有点拉 - sandbox "main/src/genmai/Sandbox" + sandbox "main/genmai/Sandbox" ) type ExplorerConfigWeb struct { diff --git a/src/genmai/Sandbox/SandboxBase.go b/src/genmai/Sandbox/SandboxBase.go index 2adb41a..e74e543 100644 --- a/src/genmai/Sandbox/SandboxBase.go +++ b/src/genmai/Sandbox/SandboxBase.go @@ -34,7 +34,7 @@ import ( // 是以main开头。 // // go 有点拉 - inter "main/src/genmai/Interpreter" + inter "main/genmai/Interpreter" ) // 继承于Interpreter接口 diff --git a/src/genmai/Sandbox/SandboxDefault.go b/src/genmai/Sandbox/SandboxDefault.go index a96bd1d..095ffdf 100644 --- a/src/genmai/Sandbox/SandboxDefault.go +++ b/src/genmai/Sandbox/SandboxDefault.go @@ -40,7 +40,7 @@ import ( // 是以main开头。 // // go 有点拉 - inter "main/src/genmai/Interpreter" + inter "main/genmai/Interpreter" ) // 继承与SandBoxBase接口 diff --git a/go.mod b/src/go.mod similarity index 100% rename from go.mod rename to src/go.mod diff --git a/go.sum b/src/go.sum similarity index 100% rename from go.sum rename to src/go.sum diff --git a/main b/src/main similarity index 100% rename from main rename to src/main diff --git a/main.go b/src/main.go similarity index 96% rename from main.go rename to src/main.go index 05c5e0d..1b7ee30 100644 --- a/main.go +++ b/src/main.go @@ -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(">>") diff --git a/test b/src/test similarity index 100% rename from test rename to src/test diff --git a/test.go b/src/test.go similarity index 95% rename from test.go rename to src/test.go index 3e18eac..76c5d7e 100644 --- a/test.go +++ b/src/test.go @@ -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) diff --git a/src/ActuatorFile/CVE-2021-22205/CVE-2021-22205.py b/z-container/ActuatorFile/CVE-2021-22205/CVE-2021-22205.py similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/CVE-2021-22205.py rename to z-container/ActuatorFile/CVE-2021-22205/CVE-2021-22205.py diff --git a/src/ActuatorFile/CVE-2021-22205/README.md b/z-container/ActuatorFile/CVE-2021-22205/README.md similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/README.md rename to z-container/ActuatorFile/CVE-2021-22205/README.md diff --git a/src/ActuatorFile/CVE-2021-22205/img/attack.png b/z-container/ActuatorFile/CVE-2021-22205/img/attack.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/attack.png rename to z-container/ActuatorFile/CVE-2021-22205/img/attack.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/attack_command1.png b/z-container/ActuatorFile/CVE-2021-22205/img/attack_command1.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/attack_command1.png rename to z-container/ActuatorFile/CVE-2021-22205/img/attack_command1.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/attack_command2.png b/z-container/ActuatorFile/CVE-2021-22205/img/attack_command2.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/attack_command2.png rename to z-container/ActuatorFile/CVE-2021-22205/img/attack_command2.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/check.png b/z-container/ActuatorFile/CVE-2021-22205/img/check.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/check.png rename to z-container/ActuatorFile/CVE-2021-22205/img/check.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/reverse_shell1.png b/z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell1.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/reverse_shell1.png rename to z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell1.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/reverse_shell2.png b/z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell2.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/reverse_shell2.png rename to z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell2.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/reverse_shell3.png b/z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell3.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/reverse_shell3.png rename to z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell3.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/reverse_shell4.png b/z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell4.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/reverse_shell4.png rename to z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell4.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/reverse_shell5.png b/z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell5.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/reverse_shell5.png rename to z-container/ActuatorFile/CVE-2021-22205/img/reverse_shell5.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/scan_result.png b/z-container/ActuatorFile/CVE-2021-22205/img/scan_result.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/scan_result.png rename to z-container/ActuatorFile/CVE-2021-22205/img/scan_result.png diff --git a/src/ActuatorFile/CVE-2021-22205/img/usage.png b/z-container/ActuatorFile/CVE-2021-22205/img/usage.png similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/img/usage.png rename to z-container/ActuatorFile/CVE-2021-22205/img/usage.png diff --git a/src/ActuatorFile/CVE-2021-22205/target.txt b/z-container/ActuatorFile/CVE-2021-22205/target.txt similarity index 100% rename from src/ActuatorFile/CVE-2021-22205/target.txt rename to z-container/ActuatorFile/CVE-2021-22205/target.txt diff --git a/src/ActuatorFile/CVE-2021-3156/Makefile b/z-container/ActuatorFile/CVE-2021-3156/Makefile similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/Makefile rename to z-container/ActuatorFile/CVE-2021-3156/Makefile diff --git a/src/ActuatorFile/CVE-2021-3156/README.md b/z-container/ActuatorFile/CVE-2021-3156/README.md similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/README.md rename to z-container/ActuatorFile/CVE-2021-3156/README.md diff --git a/src/ActuatorFile/CVE-2021-3156/exploit b/z-container/ActuatorFile/CVE-2021-3156/exploit similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/exploit rename to z-container/ActuatorFile/CVE-2021-3156/exploit diff --git a/src/ActuatorFile/CVE-2021-3156/exploit.c b/z-container/ActuatorFile/CVE-2021-3156/exploit.c similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/exploit.c rename to z-container/ActuatorFile/CVE-2021-3156/exploit.c diff --git a/src/ActuatorFile/CVE-2021-3156/images/450acf1a2f14793aafa987905b20eeba.png b/z-container/ActuatorFile/CVE-2021-3156/images/450acf1a2f14793aafa987905b20eeba.png similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/images/450acf1a2f14793aafa987905b20eeba.png rename to z-container/ActuatorFile/CVE-2021-3156/images/450acf1a2f14793aafa987905b20eeba.png diff --git a/src/ActuatorFile/CVE-2021-3156/libnss_x/x.so.2 b/z-container/ActuatorFile/CVE-2021-3156/libnss_x/x.so.2 similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/libnss_x/x.so.2 rename to z-container/ActuatorFile/CVE-2021-3156/libnss_x/x.so.2 diff --git a/src/ActuatorFile/CVE-2021-3156/shellcode.c b/z-container/ActuatorFile/CVE-2021-3156/shellcode.c similarity index 100% rename from src/ActuatorFile/CVE-2021-3156/shellcode.c rename to z-container/ActuatorFile/CVE-2021-3156/shellcode.c diff --git a/src/ActuatorFile/CVE-2022-22555/CVE-2021-22555.c b/z-container/ActuatorFile/CVE-2022-22555/CVE-2021-22555.c similarity index 100% rename from src/ActuatorFile/CVE-2022-22555/CVE-2021-22555.c rename to z-container/ActuatorFile/CVE-2022-22555/CVE-2021-22555.c diff --git a/src/ActuatorFile/CVE-2022-22555/CVE-2021-22555_x86_64 b/z-container/ActuatorFile/CVE-2022-22555/CVE-2021-22555_x86_64 similarity index 100% rename from src/ActuatorFile/CVE-2022-22555/CVE-2021-22555_x86_64 rename to z-container/ActuatorFile/CVE-2022-22555/CVE-2021-22555_x86_64 diff --git a/src/Cache/Cache.go b/z-container/Cache/Cache.go similarity index 100% rename from src/Cache/Cache.go rename to z-container/Cache/Cache.go diff --git a/src/Validator/Validator.go b/z-container/Validator/Validator.go similarity index 100% rename from src/Validator/Validator.go rename to z-container/Validator/Validator.go diff --git a/src/Yaml/kernel/CVE-2021/CVE-2021-3156.yaml b/z-container/Yaml/kernel/CVE-2021/CVE-2021-3156.yaml similarity index 100% rename from src/Yaml/kernel/CVE-2021/CVE-2021-3156.yaml rename to z-container/Yaml/kernel/CVE-2021/CVE-2021-3156.yaml diff --git a/src/Yaml/system/CVE-2021/CVE-2021-3156.yaml b/z-container/Yaml/system/CVE-2021/CVE-2021-3156.yaml similarity index 100% rename from src/Yaml/system/CVE-2021/CVE-2021-3156.yaml rename to z-container/Yaml/system/CVE-2021/CVE-2021-3156.yaml diff --git a/src/Yaml/web/CVE-2021-22205.yaml b/z-container/Yaml/web/CVE-2021-22205.yaml similarity index 100% rename from src/Yaml/web/CVE-2021-22205.yaml rename to z-container/Yaml/web/CVE-2021-22205.yaml