Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plugins/MS17010-Exp.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func MS17010EXP(info *Common.HostInfo) {

// 验证shellcode有效性
if len(sc) < 20 {
fmt.Println("无效的Shellcode")
Common.LogError("无效的Shellcode")
return
}

Expand Down
12 changes: 6 additions & 6 deletions WebScan/lib/Client.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func LoadMultiPoc(Pocs embed.FS, pocname string) []*Poc {
if p, err := LoadPoc(f, Pocs); err == nil {
pocs = append(pocs, p)
} else {
fmt.Printf("POC加载失败 %s: %v\n", f, err)
Common.LogError(fmt.Sprintf("POC加载失败 %s: %v", f, err))
}
}
return pocs
Expand All @@ -268,14 +268,14 @@ func LoadPoc(fileName string, Pocs embed.FS) (*Poc, error) {
// 读取POC文件内容
yamlFile, err := Pocs.ReadFile("pocs/" + fileName)
if err != nil {
fmt.Printf("POC文件读取失败 %s: %v\n", fileName, err)
Common.LogError(fmt.Sprintf("POC文件读取失败 %s: %v", fileName, err))
return nil, err
}

// 解析YAML内容
err = yaml.Unmarshal(yamlFile, p)
if err != nil {
fmt.Printf("POC解析失败 %s: %v\n", fileName, err)
Common.LogError(fmt.Sprintf("POC解析失败 %s: %v", fileName, err))
return nil, err
}
return p, err
Expand All @@ -285,7 +285,7 @@ func LoadPoc(fileName string, Pocs embed.FS) (*Poc, error) {
func SelectPoc(Pocs embed.FS, pocname string) []string {
entries, err := Pocs.ReadDir("pocs")
if err != nil {
fmt.Printf("读取POC目录失败: %v\n", err)
Common.LogError(fmt.Sprintf("读取POC目录失败: %v", err))
}

var foundFiles []string
Expand All @@ -304,14 +304,14 @@ func LoadPocbyPath(fileName string) (*Poc, error) {
// 读取POC文件内容
data, err := os.ReadFile(fileName)
if err != nil {
fmt.Printf("POC文件读取失败 %s: %v\n", fileName, err)
Common.LogError(fmt.Sprintf("POC文件读取失败 %s: %v", fileName, err))
return nil, err
}

// 解析YAML内容
err = yaml.Unmarshal(data, p)
if err != nil {
fmt.Printf("POC解析失败 %s: %v\n", fileName, err)
Common.LogError(fmt.Sprintf("POC解析失败 %s: %v", fileName, err))
return nil, err
}
return p, err
Expand Down
2 changes: 1 addition & 1 deletion WebScan/lib/Eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ func reverseCheck(r *Reverse, timeout int64) bool {
isOK := bytes.Contains(resp.Body, []byte(`"message": "OK"`))

if hasData && isOK {
fmt.Println(apiURL)
Common.LogDebug(apiURL)
return true
}
return false
Expand Down