ContentPreprocessor
Defined in: packages/core/src/detection-engine/preprocessor.ts:106
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ContentPreprocessor(
maxContentLength?,preserveAttackPatterns?,maxFullScanBytes?):ContentPreprocessor
Defined in: packages/core/src/detection-engine/preprocessor.ts:114
Parameters
Section titled “Parameters”maxContentLength?
Section titled “maxContentLength?”number = 10000
preserveAttackPatterns?
Section titled “preserveAttackPatterns?”boolean = true
maxFullScanBytes?
Section titled “maxFullScanBytes?”number | null
Returns
Section titled “Returns”ContentPreprocessor
Properties
Section titled “Properties”compiledIndicators
Section titled “compiledIndicators”
readonlycompiledIndicators:RegExp[]
Defined in: packages/core/src/detection-engine/preprocessor.ts:110
maxContentLength
Section titled “maxContentLength”
readonlymaxContentLength:number
Defined in: packages/core/src/detection-engine/preprocessor.ts:107
maxFullScanBytes
Section titled “maxFullScanBytes”
readonlymaxFullScanBytes:number
Defined in: packages/core/src/detection-engine/preprocessor.ts:109
preserveAttackPatterns
Section titled “preserveAttackPatterns”
readonlypreserveAttackPatterns:boolean
Defined in: packages/core/src/detection-engine/preprocessor.ts:108
Methods
Section titled “Methods”decodeCommonEncodings()
Section titled “decodeCommonEncodings()”decodeCommonEncodings(
content,decodeBudgetExhausted?):Promise<string>
Defined in: packages/core/src/detection-engine/preprocessor.ts:232
Parameters
Section titled “Parameters”content
Section titled “content”string
decodeBudgetExhausted?
Section titled “decodeBudgetExhausted?”boolean
Returns
Section titled “Returns”Promise<string>
extractAttackRegions()
Section titled “extractAttackRegions()”extractAttackRegions(
content): [number,number][]
Defined in: packages/core/src/detection-engine/preprocessor.ts:181
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”[number, number][]
normalizeUnicode()
Section titled “normalizeUnicode()”normalizeUnicode(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:162
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
preprocess()
Section titled “preprocess()”preprocess(
content,decodeBudgetExhausted?):Promise<string>
Defined in: packages/core/src/detection-engine/preprocessor.ts:297
Parameters
Section titled “Parameters”content
Section titled “content”string
decodeBudgetExhausted?
Section titled “decodeBudgetExhausted?”boolean
Returns
Section titled “Returns”Promise<string>
preprocessBatch()
Section titled “preprocessBatch()”preprocessBatch(
contents):Promise<string[]>
Defined in: packages/core/src/detection-engine/preprocessor.ts:328
Parameters
Section titled “Parameters”contents
Section titled “contents”string[]
Returns
Section titled “Returns”Promise<string[]>
preprocessShortBase64AdditiveView()
Section titled “preprocessShortBase64AdditiveView()”preprocessShortBase64AdditiveView(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:324
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
preprocessSignalPreserving()
Section titled “preprocessSignalPreserving()”preprocessSignalPreserving(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:302
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
preprocessUrlDecodedNewlinePreserving()
Section titled “preprocessUrlDecodedNewlinePreserving()”preprocessUrlDecodedNewlinePreserving(
content,decodeBudgetExhausted?):Promise<string>
Defined in: packages/core/src/detection-engine/preprocessor.ts:308
Parameters
Section titled “Parameters”content
Section titled “content”string
decodeBudgetExhausted?
Section titled “decodeBudgetExhausted?”boolean
Returns
Section titled “Returns”Promise<string>
preprocessWithDecoded()
Section titled “preprocessWithDecoded()”preprocessWithDecoded(
content,decodeBudgetExhausted?):Promise<[string,string]>
Defined in: packages/core/src/detection-engine/preprocessor.ts:282
Parameters
Section titled “Parameters”content
Section titled “content”string
decodeBudgetExhausted?
Section titled “decodeBudgetExhausted?”boolean
Returns
Section titled “Returns”Promise<[string, string]>
removeExcessiveWhitespace()
Section titled “removeExcessiveWhitespace()”removeExcessiveWhitespace(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:174
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
removeNullBytes()
Section titled “removeNullBytes()”removeNullBytes(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:170
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
setAgentHandler()
Section titled “setAgentHandler()”setAgentHandler(
agentHandler,correlationId?):void
Defined in: packages/core/src/detection-engine/preprocessor.ts:128
Parameters
Section titled “Parameters”agentHandler
Section titled “agentHandler”correlationId?
Section titled “correlationId?”string | null
Returns
Section titled “Returns”void
stripSqlComments()
Section titled “stripSqlComments()”stripSqlComments(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:223
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
truncateSafely()
Section titled “truncateSafely()”truncateSafely(
content):string
Defined in: packages/core/src/detection-engine/preprocessor.ts:201
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string