mirror of https://gitee.com/openkylin/genmai.git
临时分支,只为了演示
This commit is contained in:
parent
17204e34de
commit
94e787986a
|
@ -36,13 +36,13 @@ import (
|
|||
)
|
||||
|
||||
func
|
||||
Draw() (rc error) {
|
||||
genmai.DoctorIns().Reset()
|
||||
Draw(rps []genmai.ReportBase) (rc error) {
|
||||
//genmai.DoctorIns().Reset()
|
||||
/* */
|
||||
genmai.DoctorIns().LoadExplorersListConfig("data/KernelPocs/KernelPocs.yaml")
|
||||
genmai.DoctorIns().LoadExplorersListConfig("data/SystemPocs/SystemPocs.yaml")
|
||||
//genmai.DoctorIns().LoadExplorersListConfig("data/KernelPocs/KernelPocs.yaml")
|
||||
//genmai.DoctorIns().LoadExplorersListConfig("data/SystemPocs/SystemPocs.yaml")
|
||||
|
||||
rps := genmai.DoctorIns().Genmai()
|
||||
//rps := genmai.DoctorIns().Genmai()
|
||||
|
||||
G_FrameReport.Setup(rps)
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"sync"
|
||||
"log"
|
||||
"main/genmai"
|
||||
gcon "main/gconsole"
|
||||
)
|
||||
|
||||
|
||||
|
@ -45,17 +46,20 @@ func CoprogramPool(Request map[string]string,ipList []string,OutPutJson string)
|
|||
log.Println("未加载kernel模块")
|
||||
}
|
||||
|
||||
if len(Request["system"]) > 0 {
|
||||
// if system, found := cache.Get("system"); found {
|
||||
// systemVul:=*(system.(*Cache.MyStruct))
|
||||
// // SystemTaskNums=len(systemVul.Msg)
|
||||
// }
|
||||
// if len(Request["system"]) > 0 {
|
||||
// // if system, found := cache.Get("system"); found {
|
||||
// // systemVul:=*(system.(*Cache.MyStruct))
|
||||
// // // SystemTaskNums=len(systemVul.Msg)
|
||||
// // }
|
||||
//
|
||||
// go worker(OutPutJson,system,&wg)
|
||||
//
|
||||
// }else{
|
||||
// log.Println("未加载system模块")
|
||||
// }
|
||||
|
||||
go worker(OutPutJson,system,&wg)
|
||||
|
||||
}else{
|
||||
log.Println("未加载system模块")
|
||||
}
|
||||
rps := genmai.System(OutPutJson)
|
||||
gcon.Draw(rps)
|
||||
|
||||
|
||||
if len(Request["web"]) > 0 && len(ipList)>0{
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
package genmai
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"os"
|
||||
)
|
||||
|
||||
func SystemCreatFile(rp *ReportSystem,fileName string){
|
||||
|
@ -116,10 +116,8 @@ func Kernel(OutPutJson string) {
|
|||
DoctorIns().LoadExplorersListConfig("../data/KernelPocs/KernelPocs.yaml")
|
||||
|
||||
A_DEBUG_INFO(">>Genmai Kernel>>")
|
||||
DoctorIns().GenmaiKernel()
|
||||
|
||||
}
|
||||
func System(OutPutJson string) {
|
||||
func System(OutPutJson string) (rps []ReportBase) {
|
||||
|
||||
DoctorIns().Reset()
|
||||
DoctorIns().LoadExplorersListConfig("../data/SystemPocs/SystemPocs.yaml")
|
||||
|
@ -131,6 +129,10 @@ func System(OutPutJson string) {
|
|||
}else if OutPutJson !="null"{
|
||||
SystemCreatFile(rp,OutPutJson)
|
||||
}
|
||||
|
||||
rps = append(rps, rp)
|
||||
|
||||
return rps
|
||||
}
|
||||
func Web(OutPutJson string) {
|
||||
fmt.Println("web")
|
||||
|
|
Loading…
Reference in New Issue