From 98da5e605e5a49929ba56a43dc751508e1d9682a Mon Sep 17 00:00:00 2001 From: nodauf Date: Sat, 5 Feb 2022 13:21:41 +0400 Subject: [PATCH] Supports all keyword for the mode --- src/cmd/enum/smtp.go | 2 +- src/modules/smtp/userEnum.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/enum/smtp.go b/src/cmd/enum/smtp.go index 6daf341..9651ddf 100644 --- a/src/cmd/enum/smtp.go +++ b/src/cmd/enum/smtp.go @@ -36,7 +36,7 @@ var smtpCmd = &cobra.Command{ func init() { smtpCmd.Flags().StringVarP(&smtpOptions.Domain, "domain", "d", "", "Targeted domain ") - smtpCmd.Flags().StringVarP(&smtpOptions.Mode, "mode", "m", "", "RCPT, VRFY, EXPN (default: all)") + smtpCmd.Flags().StringVarP(&smtpOptions.Mode, "mode", "m", "", "RCPT, VRFY, EXPN, ALL (default: all)") smtpCmd.Flags().StringVarP(&smtpOptions.Users, "user", "u", "", "Username or file containing the usernames") smtpCmd.Flags().StringVarP(&smtpOptions.Target, "target", "t", "", "Host pointing to the SMTP service. If not specified, the first SMTP server in the MX record will be targeted.") smtpCmd.Flags().IntVar(&smtpOptions.Thread, "thread", 2, "Number of threads") diff --git a/src/modules/smtp/userEnum.go b/src/modules/smtp/userEnum.go index e26dd4d..015ffc8 100644 --- a/src/modules/smtp/userEnum.go +++ b/src/modules/smtp/userEnum.go @@ -87,14 +87,14 @@ func UserEnum(optionsInterface *interface{}, username string) bool { options.Log.Fatal("The command EXPN is not implemented. No need to pursue using this method.") } } - case "": + case "", "all": optionsCopy := *options options.connectionsPool <- smtpConnection // Execute the 3 enumeration methods optionsCopy.all = true // RCPT request - options.Log.Debug("No enumeration method specify. Executing enumeration with RCPT, VRFY and EXPN") + options.Log.Debug("No enumeration method specify. Executing enumeration with RCPT, VRFY, EXPN and ALL") options.Log.Debug("Enumerate with RCPT") optionsCopy.Mode = "rcpt" newOptionsInterface := reflect.ValueOf(&optionsCopy).Interface()