File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ filter {
8585 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8686
8787 ruby {
88- code => "if !event['message'].nil?; modSecSectionData = event['message'].split(/(--[a-fA-F0-9]{8}-[A-Z]--)/); modSecSectionData.shift; for i in 0..(modSecSectionData.length-1); sectionName = modSecSectionData.shift; if sectionName.nil?; break; end; sectionData = modSecSectionData.shift; if sectionName.include? '-A--'; sectionName = 'rawSectionA'; elsif sectionName.include? '-B--'; sectionName = 'rawSectionB'; elsif sectionName.include? '-C--'; sectionName = 'rawSectionC'; elsif sectionName.include? '-D--'; sectionName = 'rawSectionD'; elsif sectionName.include? '-E--'; sectionName = 'rawSectionE'; elsif sectionName.include? '-F--'; sectionName = 'rawSectionF'; elsif sectionName.include? '-G--'; sectionName = 'rawSectionG'; elsif sectionName.include? '-H--'; sectionName = 'rawSectionH'; elsif sectionName.include? '-I--'; sectionName = 'rawSectionI'; elsif sectionName.include? '-J--'; sectionName = 'rawSectionJ'; elsif sectionName.include? '-K--'; sectionName = 'rawSectionK'; else; sectionName = ''; end;if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; sectionName = sectionName.strip; sectionData = sectionData.strip; if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; event.to_hash.merge!(sectionName => sectionData); end; end; end; end"
88+ code => "if !event['message'].nil?; modSecSectionData = event['message'].split(/(--[a-fA-F0-9]{8}-[A-Z]--)/); modSecSectionData.shift; for i in 0..(modSecSectionData.length-1); sectionName = modSecSectionData.shift; if sectionName.nil?; break; end; sectionData = modSecSectionData.shift; if sectionName.include? '-A--'; sectionName = 'rawSectionA'; elsif sectionName.include? '-B--'; sectionName = 'rawSectionB'; elsif sectionName.include? '-C--'; sectionName = 'rawSectionC'; elsif sectionName.include? '-D--'; sectionName = 'rawSectionD'; elsif sectionName.include? '-E--'; sectionName = 'rawSectionE'; elsif sectionName.include? '-F--'; sectionName = 'rawSectionF'; elsif sectionName.include? '-G--'; sectionName = 'rawSectionG'; elsif sectionName.include? '-H--'; sectionName = 'rawSectionH'; elsif sectionName.include? '-I--'; sectionName = 'rawSectionI'; elsif sectionName.include? '-J--'; sectionName = 'rawSectionJ'; elsif sectionName.include? '-K--'; sectionName = 'rawSectionK'; else; sectionName = ''; end;if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; sectionName = sectionName.strip; if !sectionData.nil?; sectionData = sectionData.strip; end; if !sectionName.nil? and sectionName != '' and sectionName != 'null' and sectionName != ' '; event.to_hash.merge!(sectionName => sectionData); end; end; end; end"
8989 }
9090
9191
You can’t perform that action at this time.
0 commit comments