Extends
Methods
append(sufix) → {Wrapper_HTML}
Add a sufix to a payload
Parameters
Name | Type | Description |
---|---|---|
sufix |
String | Sufix to add to the current payload |
Returns
- Type
- Wrapper_HTML
dataUrl() → {Wrapper_HTMLDataUrl}
Transform any html into a data url payload.
Returns
- Type
- Wrapper_HTMLDataUrl
dataUrl64() → {Wrapper_HTMLDataUrl}
Transform any html into a data url base64 encoded payload.
Returns
- Type
- Wrapper_HTMLDataUrl
enclose(prefix, sufix) → {Wrapper_HTML}
Add a prefix and a sufix to a payload
Parameters
Name | Type | Description |
---|---|---|
prefix |
String | Prefix to add to the current payload |
sufix |
String | Sufix to add to the current payload |
Returns
- Type
- Wrapper_HTML
iframe() → {Wrapper_HTML}
Transform any html into a <iframe srcdoc> payload.
Example
const p = Payload.new().eval(() => alert(1))
const w = Wrapper.new().script().iframe()
document.body.innerHTML = w.wrap(p)
Returns
- Type
- Wrapper_HTML
innerHTML(targetopt) → {Wrapper_JS}
Transform any html into a el.innerHTML= payload.
Example
const p = Payload.new().eval(() => alert(1))
const w = Wrapper.new().script().innerHTML()
const c = w.wrap(p)
eval(c)
Parameters
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
target |
string |
<optional> |
"body" | CSS selector for the parent element. |
Returns
- Type
- Wrapper_JS
prepend(prefix) → {Wrapper_HTML}
Add a prefix to a payload
Parameters
Name | Type | Description |
---|---|---|
prefix |
String | Prefix to add to the current payload |
Returns
- Type
- Wrapper_HTML
wrap(payload) → {string}
Wrap a payload or a string and return it a as string
Example
const p = Payload.new().eval(() => alert(1))
const w = Wrapper.new()
const code = w.wrap(p)
eval(code)
- Inherited From:
Parameters
Name | Type | Description |
---|---|---|
payload |
Payload | String | Payload to wrap |
Returns
- Type
- string
write() → {Wrapper_JS}
Transform any html into a document.write payload.
Example
const p = Payload.new().eval(() => alert(1))
const w = Wrapper.new().script().write()
const c = w.wrap(p)
eval(c)
Returns
- Type
- Wrapper_JS