don't embed status characters in messages, use correct logging instead
parent
09ffce4ec5
commit
7f4d97ef46
|
@ -89,10 +89,10 @@ func o365enum(ip string, emaillist []string, threads int) []string {
|
|||
for email := range queue {
|
||||
responseCode := msmail.WebRequestBasicAuth(URI, email, pass, tr)
|
||||
if strings.Contains(email, "@") && responseCode == 401 {
|
||||
module.LogInfo("[+] " + email + " - 401")
|
||||
module.LogGood(email + " - 401")
|
||||
validemails = append(validemails, email)
|
||||
} else if strings.Contains(email, "@") && responseCode == 404 {
|
||||
module.LogInfo(fmt.Sprintf("[-] %s - %d", email, responseCode))
|
||||
module.LogError(fmt.Sprintf("%s - %d", email, responseCode))
|
||||
} else {
|
||||
module.LogError(fmt.Sprintf("Unusual Response: %s - %d", email, responseCode))
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ func urlEnum(hostInput string) {
|
|||
o365Domain := hostSlice[len(hostSlice)-2] + "-" + hostSlice[len(hostSlice)-1] + ".mail.protection.outlook.com"
|
||||
addr, err := net.LookupIP(o365Domain)
|
||||
if err != nil {
|
||||
module.LogInfo("[-] Domain is not using o365 resources.")
|
||||
module.LogError("Domain is not using o365 resources.")
|
||||
} else if addr == nil {
|
||||
module.LogError("error")
|
||||
} else {
|
||||
module.LogInfo("[+] Domain is using o365 resources.")
|
||||
module.LogGood("Domain is using o365 resources.")
|
||||
}
|
||||
asURI := "https://" + hostInput + "/Microsoft-Server-ActiveSync"
|
||||
adURI := "https://" + hostInput + "/autodiscover/autodiscover.xml"
|
||||
|
@ -51,11 +51,11 @@ func urlEnum(hostInput string) {
|
|||
for _, uri := range timeEndpoints {
|
||||
responseCode := msmail.WebRequestCodeResponse(uri)
|
||||
if responseCode == 401 {
|
||||
module.LogInfo("[+] " + uri)
|
||||
module.LogGood(uri)
|
||||
timeEndpointsIdentified = true
|
||||
}
|
||||
if responseCode == 200 {
|
||||
module.LogInfo("[+] " + uri)
|
||||
module.LogGood(uri)
|
||||
timeEndpointsIdentified = true
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ func urlEnum(hostInput string) {
|
|||
for _, uri := range passEndpoints401 {
|
||||
responseCode := msmail.WebRequestCodeResponse(uri)
|
||||
if responseCode == 401 {
|
||||
module.LogInfo("[+] " + uri)
|
||||
module.LogGood(uri)
|
||||
passEndpointIdentified = true
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ func urlEnum(hostInput string) {
|
|||
for _, uri := range endpoints200 {
|
||||
responseCode := msmail.WebRequestCodeResponse(uri)
|
||||
if responseCode == 200 {
|
||||
module.LogInfo("[+] " + uri)
|
||||
module.LogGood(uri)
|
||||
passEndpointIdentified = true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,10 +100,10 @@ func determineValidUsers(host string, avgResponse time.Duration, userlist []stri
|
|||
elapsedTime := time.Since(startTime)
|
||||
|
||||
if float64(elapsedTime) < float64(avgResponse)*0.77 {
|
||||
module.LogInfo("[+] " + user + " - " + elapsedTime.String())
|
||||
module.LogGood(user + " - " + elapsedTime.String())
|
||||
validusers = append(validusers, user)
|
||||
} else {
|
||||
module.LogInfo("[-] " + user + " - " + elapsedTime.String())
|
||||
module.LogError(user + " - " + elapsedTime.String())
|
||||
}
|
||||
}
|
||||
}(i)
|
||||
|
|
Loading…
Reference in New Issue