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