From b90d7d20b6b988d4d5774457921e721f2eec2b8e Mon Sep 17 00:00:00 2001 From: ro0tk1t <1576235794@qq.com> Date: Wed, 27 Jan 2021 13:01:23 +0800 Subject: [PATCH] add -f notification --- core/options.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/options.go b/core/options.go index 08424b9..905c555 100644 --- a/core/options.go +++ b/core/options.go @@ -117,8 +117,12 @@ func ParseOptions() *Options { if len(options.Domain) > 0 && options.Verify { gologger.Fatalf("-d 与 -verify参数不可以同时出现!") } - if options.FileName != "" && !FileExists(options.FileName) { - gologger.Fatalf("文件:%s 不存在!\n", options.FileName) + if options.FileName != "" { + if !FileExists(options.FileName) { + gologger.Fatalf("文件:%s 不存在!\n", options.FileName) + } else if !options.Verify { + gologger.Fatalf("-f需配合-d或-verify使用!\n", ) + } } if !options.Stdin && options.Verify && options.FileName == "" { gologger.Fatalf("启用了 -verify 参数但传入域名为空!")