From 6ae37b88925a99ca3915928ac98927dbc1fad995 Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Sat, 13 Jun 2026 23:09:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20-nopoc=20=E7=A6=81=E7=94=A8POC=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E8=BE=93=E5=87=BA=E9=94=99=E8=AF=AF=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/web/webpoc.go | 5 ++--- plugins/web/webpoc_test.go | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/web/webpoc.go b/plugins/web/webpoc.go index e266843..c97dfed 100644 --- a/plugins/web/webpoc.go +++ b/plugins/web/webpoc.go @@ -4,7 +4,6 @@ package web import ( "context" - "fmt" "strings" "github.com/shadow1ng/fscan/common" @@ -92,8 +91,8 @@ func (p *WebPocPlugin) Scan(ctx context.Context, info *common.HostInfo, session config := session.Config if config.POC.Disabled { return &WebScanResult{ - Success: false, - Error: fmt.Errorf("%s", i18n.GetText("webpoc_disabled")), + Success: true, + Skipped: true, } } diff --git a/plugins/web/webpoc_test.go b/plugins/web/webpoc_test.go index 7875b6e..de18171 100644 --- a/plugins/web/webpoc_test.go +++ b/plugins/web/webpoc_test.go @@ -40,8 +40,8 @@ func TestWebPocEarlyReturnBranches(t *testing.T) { cfg.POC.Disabled = true disabled := plugin.Scan(context.Background(), info, session) - if disabled.Success || disabled.Error == nil { - t.Fatalf("disabled scan = %#v, want failed result with error", disabled) + if !disabled.Skipped { + t.Fatalf("disabled scan = %#v, want skipped result", disabled) } cfg.POC.Disabled = false