fullMessage* to fullAlert*
This commit is contained in:
parent
cd17a8ed07
commit
a3d74eb632
@ -17,16 +17,16 @@ func SendDiscord(params types.Params) {
|
||||
var embedDescription string
|
||||
|
||||
if slices.Contains(strings.Split(params.FullMessage, ","), "discord") {
|
||||
fullMessage, _ := json.MarshalIndent(params.WazuhMessage, "", " ")
|
||||
fullMessageString := strings.ReplaceAll(string(fullMessage), `"`, "")
|
||||
fullMessageString = strings.ReplaceAll(fullMessageString, "{", "")
|
||||
fullMessageString = strings.ReplaceAll(fullMessageString, "}", "")
|
||||
fullMessageString = strings.ReplaceAll(fullMessageString, "[", "")
|
||||
fullMessageString = strings.ReplaceAll(fullMessageString, "]", "")
|
||||
fullMessageString = strings.ReplaceAll(fullMessageString, " ,", "")
|
||||
fullAlert, _ := json.MarshalIndent(params.WazuhMessage, "", " ")
|
||||
fullAlertString := strings.ReplaceAll(string(fullAlert), `"`, "")
|
||||
fullAlertString = strings.ReplaceAll(fullAlertString, "{", "")
|
||||
fullAlertString = strings.ReplaceAll(fullAlertString, "}", "")
|
||||
fullAlertString = strings.ReplaceAll(fullAlertString, "[", "")
|
||||
fullAlertString = strings.ReplaceAll(fullAlertString, "]", "")
|
||||
fullAlertString = strings.ReplaceAll(fullAlertString, " ,", "")
|
||||
|
||||
embedDescription = "\n\n ```" +
|
||||
fullMessageString +
|
||||
fullAlertString +
|
||||
"```\n\n" +
|
||||
"Priority: " + strconv.Itoa(params.Priority) + "\n" +
|
||||
"Tags: " + params.Tags + "\n\n" +
|
||||
|
||||
@ -60,7 +60,7 @@ func InitNotify() types.Params {
|
||||
log.Log(string(inputParamString))
|
||||
|
||||
inputParams.Targets = configParams.Targets
|
||||
inputParams.FullMessage = configParams.FullMessage
|
||||
inputParams.FullAlert = configParams.FullAlert
|
||||
inputParams.ExcludedAgents = configParams.ExcludedAgents
|
||||
inputParams.ExcludedRules = configParams.ExcludedRules
|
||||
inputParams.PriorityMaps = configParams.PriorityMaps
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user