ContentPreprocessor
Defined in: core/src/detection-engine/preprocessor.ts:52
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ContentPreprocessor(
maxContentLength?,preserveAttackPatterns?):ContentPreprocessor
Defined in: core/src/detection-engine/preprocessor.ts:56
Parameters
Section titled “Parameters”maxContentLength?
Section titled “maxContentLength?”number = 10000
preserveAttackPatterns?
Section titled “preserveAttackPatterns?”boolean = true
Returns
Section titled “Returns”ContentPreprocessor
Methods
Section titled “Methods”decodeCommonEncodings()
Section titled “decodeCommonEncodings()”decodeCommonEncodings(
content):string
Defined in: core/src/detection-engine/preprocessor.ts:77
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
extractAttackRegions()
Section titled “extractAttackRegions()”extractAttackRegions(
content): [number,number][]
Defined in: core/src/detection-engine/preprocessor.ts:126
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”[number, number][]
normalizeUnicode()
Section titled “normalizeUnicode()”normalizeUnicode(
content):string
Defined in: core/src/detection-engine/preprocessor.ts:61
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
preprocess()
Section titled “preprocess()”preprocess(
content):Promise<string>
Defined in: core/src/detection-engine/preprocessor.ts:205
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”Promise<string>
preprocessBatch()
Section titled “preprocessBatch()”preprocessBatch(
contents):Promise<string[]>
Defined in: core/src/detection-engine/preprocessor.ts:217
Parameters
Section titled “Parameters”contents
Section titled “contents”string[]
Returns
Section titled “Returns”Promise<string[]>
removeExcessiveWhitespace()
Section titled “removeExcessiveWhitespace()”removeExcessiveWhitespace(
content):string
Defined in: core/src/detection-engine/preprocessor.ts:73
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
removeNullBytes()
Section titled “removeNullBytes()”removeNullBytes(
content):string
Defined in: core/src/detection-engine/preprocessor.ts:69
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string
truncateSafely()
Section titled “truncateSafely()”truncateSafely(
content):string
Defined in: core/src/detection-engine/preprocessor.ts:162
Parameters
Section titled “Parameters”content
Section titled “content”string
Returns
Section titled “Returns”string