From 0a5f66944292f5b64a3405254777a16ce46b1c19 Mon Sep 17 00:00:00 2001 From: edboffical Date: Wed, 23 Mar 2022 21:30:38 +0800 Subject: [PATCH] modify example & README --- README.md | 10 +++------- README_CN.md | 10 +++------- example/main.go | 10 +++------- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 024b2f3..b8bf0f7 100644 --- a/README.md +++ b/README.md @@ -81,16 +81,12 @@ func main() { } c.EngineSetNum(clamav.CL_ENGINE_MAX_SCANSIZE, 1024*1024*40) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_MAX_FILESIZE, 1024*1024*20) c.EngineSetNum(clamav.CL_ENGINE_MAX_SCANTIME, 9000) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_MATCH_LIMIT, 1000) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_RECMATCH_LIMIT, 500) - - // fmt.Println(c.EngineGetNum(clamav.CL_ENGINE_PCRE_RECMATCH_LIMIT)) + // fmt.Println(c.EngineGetNum(clamav.CL_ENGINE_MAX_SCANSIZE)) // scan - scanned, msg, err := c.ScanFile("./test_file/nmap") - fmt.Println(scanned, msg, err) + scanned, virusName, ret := c.ScanFile("./test_file/nmap") + fmt.Println(scanned, virusName, ret) } ``` diff --git a/README_CN.md b/README_CN.md index 7c00b30..2399438 100644 --- a/README_CN.md +++ b/README_CN.md @@ -81,16 +81,12 @@ func main() { } c.EngineSetNum(clamav.CL_ENGINE_MAX_SCANSIZE, 1024*1024*40) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_MAX_FILESIZE, 1024*1024*20) c.EngineSetNum(clamav.CL_ENGINE_MAX_SCANTIME, 9000) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_MATCH_LIMIT, 1000) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_RECMATCH_LIMIT, 500) - - // fmt.Println(c.EngineGetNum(clamav.CL_ENGINE_PCRE_RECMATCH_LIMIT)) + // fmt.Println(c.EngineGetNum(clamav.CL_ENGINE_MAX_SCANSIZE)) // scan - scanned, msg, err := c.ScanFile("./test_file/nmap") - fmt.Println(scanned, msg, err) + scanned, virusName, ret := c.ScanFile("./test_file/nmap") + fmt.Println(scanned, virusName, ret) } ``` diff --git a/example/main.go b/example/main.go index fd5d578..55c15b6 100644 --- a/example/main.go +++ b/example/main.go @@ -38,14 +38,10 @@ func main() { } c.EngineSetNum(clamav.CL_ENGINE_MAX_SCANSIZE, 1024*1024*40) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_MAX_FILESIZE, 1024*1024*20) c.EngineSetNum(clamav.CL_ENGINE_MAX_SCANTIME, 9000) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_MATCH_LIMIT, 1000) - c.EngineSetNum(clamav.CL_ENGINE_PCRE_RECMATCH_LIMIT, 500) - - // fmt.Println(c.EngineGetNum(clamav.CL_ENGINE_PCRE_RECMATCH_LIMIT)) + // fmt.Println(c.EngineGetNum(clamav.CL_ENGINE_MAX_SCANSIZE)) // scan - scanned, msg, err := c.ScanFile("./test_file/nmap") - fmt.Println(scanned, msg, err) + scanned, virusName, ret := c.ScanFile("./test_file/nmap") + fmt.Println(scanned, virusName, ret) }