CodeDog Posted August 17, 2013 Share Posted August 17, 2013 I purchased some addon modules for the PrestaShop shopping cart system. All module files have been obfuscated (single line obfuscation). I don't know what system was used to obfuscate the code. I'm trying to add a class to one of the files, but it isn't working. Is it possible to add standard code to a file that has been obfuscated? Seems like I should be able to just add the class code above or below the obfuscated line, but apparently not. Anyone have any ideas? Thanks... Link to comment https://forums.phpfreaks.com/topic/281276-adding-code-to-obfuscated-file/ Share on other sites More sharing options...
jcbones Posted August 17, 2013 Share Posted August 17, 2013 Purchased files that are obfuscated means the developer doesn't want anyone monkey'in with their work. You could go back to the purchased place and ask them to do it for you. Adding a class to any file would work, it is tying it into the system, that you have no idea about, that is difficult. Link to comment https://forums.phpfreaks.com/topic/281276-adding-code-to-obfuscated-file/#findComment-1445509 Share on other sites More sharing options...
CodeDog Posted August 17, 2013 Author Share Posted August 17, 2013 Thanks jc. I've seen obfuscated code injected into standard code files quite often, so I figured it shouldn't be an issue to 'inject' some standard code into a file with a line of obfuscated code. Guess it doesn't work that way. Appreciate the reply... Link to comment https://forums.phpfreaks.com/topic/281276-adding-code-to-obfuscated-file/#findComment-1445515 Share on other sites More sharing options...
kicken Posted August 17, 2013 Share Posted August 17, 2013 You can add extra code above or below the existing code without a problem, ie: <?php //your new code here include 'someclass.php'; //The existing code ?> You wouldn't be able to modify anything in the middle of the existing code without undoing the obfuscation though. Without being able to modify the existing code, adding a class to the file seems kind of pointless as it wouldn't be used by the code. Link to comment https://forums.phpfreaks.com/topic/281276-adding-code-to-obfuscated-file/#findComment-1445525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.