From 893d1e18987fddd77ee23ea1f1009a00eb078c29 Mon Sep 17 00:00:00 2001 From: strawp Date: Thu, 5 Aug 2021 17:07:35 +0100 Subject: [PATCH] Also hex escapes, why not --- generator.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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