Documentation
¶
Overview ¶
Package xssencode provides reusable payload-encoding primitives and WAF-aware mutation for the XSS modules. Everything here is a pure function: callers opt in by asking for variants, so a module that never calls into this package behaves exactly as before.
- Encoding helpers (URLEncode, Base64): wrap a value so it gets past a WAF and is reconstituted by the application's own decoding. Used by the pre-encoded XSS Light variant to detect parameters the app decodes.
- WAF mutation (MutateForWAF, in wafmutate.go): rewrite an HTML/JS payload into an execution-preserving evasion form keyed off the detected WAF.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Variant ¶
Variant is a named encoding/mutation of a payload. The name is carried for finding evidence ("base64", "slash-sep", ...).
func MutateForWAF ¶
MutateForWAF returns execution-preserving evasion variants of payload tuned to the detected WAF. It excludes any variant identical to the input (the plain payload is assumed to have already been tried). An unknown/empty wafType returns nil, so callers spend no extra requests when no WAF was observed.