diff --git a/generator.php b/generator.php index e8958c5..c63708c 100644 --- a/generator.php +++ b/generator.php @@ -398,10 +398,16 @@ ], [ "name"=>"JS Unicode", - "desc"=>"Encode as unicode escaped string", + "desc"=>"Encode as JavaScript unicode escaped string", "func"=>"unicode_escape", "args"=>['[payload]'] ], + [ + "name"=>"JS Hex", + "desc"=>"Encode as JavaScript hex escaped string", + "func"=>"hex_escape", + "args"=>['[payload]'] + ], [ "name"=>"URL", "desc"=>"URL encode key characters", @@ -435,6 +441,9 @@ } return $rtn; } + function hex_escape( $payload ){ + return str_replace( '\\u00','\\x',unicode_escape( $payload ) ); + } // JSFuck: http://www.jsfuck.com/ // JSFuck PHP port: https://github.com/Zaczero/jsfuck.php