From c95164a81dcc6601cad71afa824c05e2195008fc Mon Sep 17 00:00:00 2001 From: SleepingBag945 <100852628+SleepingBag945@users.noreply.github.com> Date: Wed, 3 Jan 2024 02:40:04 +0100 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BB=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- Update.md | 10 +++++++++- common/flag.go | 2 +- details.md | 2 ++ lib/gologger/gologger.go | 6 +++--- lib/httpx/runner/runner.go | 6 +++++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3c56225..d2b12c7 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Release中下载config.zip与您操作系统对应的二进制文件。将config 默认漏洞输出结果文件名为 `当前时间戳.html` -日志保存在 `log.txt` +日志保存在 `audit.log` **-a** 参数开启审计日志功能,记录详细扫描行为。 diff --git a/Update.md b/Update.md index 3b1576d..f757fc6 100644 --- a/Update.md +++ b/Update.md @@ -1,6 +1,14 @@ # 更新日志 -## 2024.1.2 +## 2023.1.3 + +紧急修复一个因为resp为空导致读空指针的问题 + +嘎掉log.txt的记录,有审计日志就没必要存在了。 + + + +## 2023.1.2 更新到1.6版本 diff --git a/common/flag.go b/common/flag.go index 0ea132a..65ab529 100644 --- a/common/flag.go +++ b/common/flag.go @@ -34,7 +34,7 @@ func GC() { debug.FreeOSMemory() } -var version = "1.6" +var version = "1.6.1" func showBanner() { banner := fmt.Sprintf(` diff --git a/details.md b/details.md index 6e7d7c2..ee7a457 100644 --- a/details.md +++ b/details.md @@ -252,6 +252,8 @@ Usage of dddd: # 指纹/Poc拓展 +若您想让dddd作为您的指纹/漏洞库,或者作为漏洞知识沉淀的工具,请务必详细观看此节。 + ### 指纹 指纹数据库存于 ./config/finger.yaml diff --git a/lib/gologger/gologger.go b/lib/gologger/gologger.go index 5732dc5..6204d6e 100644 --- a/lib/gologger/gologger.go +++ b/lib/gologger/gologger.go @@ -95,9 +95,9 @@ func (l *Logger) Log(event *Event) { } l.writer.Write(data, event.level) - if event.level == levels.LevelSilent { - WriteFile(string(data), "log.txt") - } + //if event.level == levels.LevelSilent { + // WriteFile(string(data), "log.txt") + //} loc, _ := time.LoadLocation("Asia/Shanghai") currentTime := time.Now().In(loc).String() WriteFile("[ "+currentTime+" ] "+string(data), AuditLogFileName) diff --git a/lib/httpx/runner/runner.go b/lib/httpx/runner/runner.go index 99f944b..cbdd418 100755 --- a/lib/httpx/runner/runner.go +++ b/lib/httpx/runner/runner.go @@ -1252,7 +1252,11 @@ retry: // 审计日志 gologger.AuditTimeLogger("Dumped HTTP request for %s\n\n%s", fullURL, string(requestDump)) - gologger.AuditTimeLogger("Dumped HTTP response for %s\n\n%s", fullURL, string(resp.Raw)) + respRaw := "" + if resp != nil { + respRaw = resp.Raw + } + gologger.AuditTimeLogger("Dumped HTTP response for %s\n\n%s", fullURL, respRaw) //if r.options.Debug || r.options.DebugRequests { // gologger.Info().Msgf("Dumped HTTP request for %s\n\n", fullURL)