Skip to content

Commit

Permalink
Fix log level
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Feb 16, 2022
1 parent 64de983 commit 4df1aea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/modules/azure/userEnum.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ func UserEnum(optionsInterface *interface{}, username string) bool {
case "AADSTS50076": // Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access
options.Log.Info(username + " MFA needed")
case "AADSTS700016":
options.Log.Fail(username + " The application wasn't found in the directory/tenant")
options.Log.Error(username + " The application wasn't found in the directory/tenant")
case "AADSTS50034": // UserAccountNotFound - To sign into this application, the account must be added to the directory.
options.Log.Fail(username + " does not exist")
case "AADSTS90002":
options.Log.Fail("The Tenant '" + domain + "' does not exist")
options.Log.Error("The Tenant '" + domain + "' does not exist")
default:
options.Log.Error("Unknow error: " + structResponseAzure.Body.Fault.Detail.Error.Internalerror.Text)

Expand Down
10 changes: 5 additions & 5 deletions src/modules/o365/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ func (options *Options) enumOauth2(username string) bool {
options.Log.Success(username + " and " + password + " matched but the account is disabled")
valid = true
case "AADSTS700016":
options.Log.Fail(username + " The application wasn't found in the directory/tenant")
options.Log.Error(username + " The application wasn't found in the directory/tenant")
case "AADSTS50034": // UserAccountNotFound - To sign into this application, the account must be added to the directory.
options.Log.Fail(username + " does not exist")
case "AADSTS90002":
options.Log.Fail("The Tenant '" + username + "' does not exist")
options.Log.Error("The Tenant '" + username + "' does not exist")
default:
options.Log.Error("Unknow error: " + respStruct.ErrorDescription)

Expand Down Expand Up @@ -198,19 +198,19 @@ func (options *Options) bruteOauth2(username, password string) (bool, error) {
options.Log.Success(username + " exists but there is no password")
valid = true
case "AADSTS50014":
options.Log.Fail(username + " exists but max passthru auth time exceeded")
options.Log.Error(username + " exists but max passthru auth time exceeded")
case "AADSTS50076": // Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access
options.Log.Info(username + " MFA needed")
valid = true
case "AADSTS50057":
options.Log.Info(username + " and " + password + " matched but the account is disabled")
valid = true
case "AADSTS700016":
options.Log.Fail(username + " The application wasn't found in the directory/tenant")
options.Log.Error(username + " The application wasn't found in the directory/tenant")
case "AADSTS50034": // UserAccountNotFound - To sign into this application, the account must be added to the directory.
options.Log.Fail(username + " does not exist")
case "AADSTS90002":
options.Log.Fail("The Tenant '" + username + "' does not exist")
options.Log.Error("The Tenant '" + username + "' does not exist")
default:
options.Log.Error("Unknow error: " + respStruct.ErrorDescription)

Expand Down

0 comments on commit 4df1aea

Please sign in to comment.