Added JS Unicode encoding

This commit is contained in:
strawp 2021-08-04 16:33:22 +01:00
parent 1801217236
commit 1562f11801

View file

@ -396,6 +396,12 @@
"func"=>"str_replace",
"args"=>['"','\"','[payload]']
],
[
"name"=>"JS Unicode",
"desc"=>"Encode as unicode escaped string",
"func"=>"unicode_escape",
"args"=>['[payload]']
],
[
"name"=>"URL",
"desc"=>"URL encode key characters",
@ -422,6 +428,14 @@
]
];
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 PHP port: https://github.com/Zaczero/jsfuck.php
class JSFuck {