Hi StackOverflow Community,
Here is my question, how to convert php that has hex code into readable string ?
On what I mean is all inside this 2 php code..
<?php
echo "\x74\150\x69\163\x20\151\x73\40\x74\145\x73\164\x69\156\x67\40\x6f\156\x6c\171";
echo test['\x74\171\x70\145'];
echo range("\x61","\x7a");
?>
this is un-readable code, I need some php function that can convert those unreadable code into readable code..so it will become like this after convert..
<?php
echo "this is testing only";
echo test['type'];
echo range("a","z");
?>
I know i can just echo that hex to change it to readable string, but I have huge php file and lot’s of php file that same like this, so I need php function that can automatically convert them all into readable code.
Thank..
It seems your code is obfuscated not only with hex escape sequences, but with octal as well. I’ve written this function to decode it for you:
See it in action here: http://codepad.viper-7.com/NjiL84