refactor: 统一控制台输出风格,使用统一的日志函数

手动合并 PR #558 的改动,适配重构后的代码路径
This commit is contained in:
ZacharyZcR
2026-04-25 08:11:35 +08:00
parent d3463456d9
commit 25e66a68a0
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -328,7 +328,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
@@ -367,7 +367,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
+1 -1
View File
@@ -378,7 +378,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