alex-johnson Posted July 18, 2013 Share Posted July 18, 2013 Hi, I have a php file that i cannot read its source content , i dont know what type of encoding is it and i hope that someone here could help me out ! When i run 'file' command in linux it gives me this output : PHP script, ISO-8859 text, with LF, NEL line terminators It shows up like this in editor (Geany): In Notepad++: Is there anyway that i could convert or change it to something human readable ? Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted July 18, 2013 Share Posted July 18, 2013 (edited) Where'd you get it from? It looks like a very clever form of obfuscation. Edited July 18, 2013 by requinix Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted July 18, 2013 Share Posted July 18, 2013 Where'd you get it from? It looks like a very clever form of obfuscation. Yes, most likely one of the ones that requires a decoder loaded on the server. Quote Link to comment Share on other sites More sharing options...
alex-johnson Posted July 18, 2013 Author Share Posted July 18, 2013 Actually its does not need a loader! Any idea how to convert it to ASCII? Quote Link to comment Share on other sites More sharing options...
requinix Posted July 18, 2013 Share Posted July 18, 2013 PHP allows most names to use high-byte characters (ASCII >127). It's valid PHP code. You'd have to do a sort of find-and-replace for each one, keeping in mind that replacing "ABC" might also find "ABCD" even though they're two logically different names. What are you trying to do? Obfuscated code typically has restrictive licenses. Quote Link to comment Share on other sites More sharing options...
alex-johnson Posted July 18, 2013 Author Share Posted July 18, 2013 Im kind of a newbie in PHP and to be honest i dont get it! The script belongs to me but the programmer is not avilable anymore and i have to change the server and do some modifications . I'll be appreciated if you could explain to me how should i do find-and-replace in this codes. Quote Link to comment Share on other sites More sharing options...
requinix Posted July 18, 2013 Share Posted July 18, 2013 I'm not talking about some fancy PHP thing. I mean find and replace in Geany or Notepad++ or whatever. Like Ctrl+F. Pick a name and change it to something readable, then find the other places it's used and change them too. Quote Link to comment Share on other sites More sharing options...
alex-johnson Posted July 19, 2013 Author Share Posted July 19, 2013 It will take forever to make it readable this way! Isn't there any other way to convert this code?!!!! Quote Link to comment Share on other sites More sharing options...
requinix Posted July 19, 2013 Share Posted July 19, 2013 No existing tool that I know of. Quote Link to comment Share on other sites More sharing options...
alex-johnson Posted July 19, 2013 Author Share Posted July 19, 2013 Sorry for asking this question but what exactly should i find-replace ? Quote Link to comment Share on other sites More sharing options...
requinix Posted July 19, 2013 Share Posted July 19, 2013 The names. Variables, classes, functions, whatever. They're all names - they just happen to not be written using letters from a keyboard. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.