mirror of
https://github.com/nettitude/xss_payloads.git
synced 2024-11-10 06:34:14 +00:00
Added JS Unicode encoding
This commit is contained in:
parent
1801217236
commit
1562f11801
1 changed files with 15 additions and 1 deletions
|
@ -396,6 +396,12 @@
|
||||||
"func"=>"str_replace",
|
"func"=>"str_replace",
|
||||||
"args"=>['"','\"','[payload]']
|
"args"=>['"','\"','[payload]']
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"name"=>"JS Unicode",
|
||||||
|
"desc"=>"Encode as unicode escaped string",
|
||||||
|
"func"=>"unicode_escape",
|
||||||
|
"args"=>['[payload]']
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"name"=>"URL",
|
"name"=>"URL",
|
||||||
"desc"=>"URL encode key characters",
|
"desc"=>"URL encode key characters",
|
||||||
|
@ -421,7 +427,15 @@
|
||||||
"args"=>["[payload]"]
|
"args"=>["[payload]"]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function unicode_escape( $payload ){
|
||||||
|
$rtn = '';
|
||||||
|
for ($i = 0; $i < strlen($payload); $i++) {
|
||||||
|
$rtn .= '\\u' . str_pad(dechex(ord($payload[$i])), 4, '0', STR_PAD_LEFT);
|
||||||
|
}
|
||||||
|
return $rtn;
|
||||||
|
}
|
||||||
|
|
||||||
// JSFuck: http://www.jsfuck.com/
|
// JSFuck: http://www.jsfuck.com/
|
||||||
// JSFuck PHP port: https://github.com/Zaczero/jsfuck.php
|
// JSFuck PHP port: https://github.com/Zaczero/jsfuck.php
|
||||||
class JSFuck {
|
class JSFuck {
|
||||||
|
|
Loading…
Reference in a new issue