NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Yet Another PHP Obfuscator

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-23-2006, 09:21 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: May 2006
Posts: 160
TwistMyArm is on a distinguished road
 



Yet Another PHP Obfuscator


Hi guys,

I've posted this to another couple of forums so please excuse me if you've read it before... I consider myself lucky for traveling in the same circles, I guess!


Just wanted to let everyone know that after hoarding some changes to another code base for some time, I've decided to release the code I use for obfuscating my PHP. I'm trying to get my code changes back in to the original branch, but the process has been rockier than I expected.
????: NamePros.com http://www.namepros.com/code/230765-yet-another-php-obfuscator.html

Anyway: a few things about this. Firstly, I prefer obfuscation to compilers and / or encrypters as obfuscated code does not rely on the host server having anything in particular installed. I basically don't need the hassle of trying to get my clients to ensure that certain extensions are installed...

So what makes this obfuscator different?
1) it uses the PHP tokenizer... it doesn't try and parse the code itself. A fair amount of other obfuscators try to parse the code themselves and do a terrible job of it. The hard work of understanding the code 'structure' is done already by the PHP engine... making it more reliable.

2) it obfuscates constants. I don't know of any other obfuscators that do this.

3) it has an include / exclude system: that way I can choose not to obfuscate certain functions, for example... perfect for when you want to use a CMS API or something similar, but still want to obfuscate *your* code. Plus, this list can contain wildcards.

4) it obfuscates step by step: it runs as a command line script and only obfuscates what you want. It does this step by step, keeping all previous steps so that you can verify that it worked (there's nothing worse than going from your code to fully obfuscated in one step... it's practically unveriable!).


So that's the major points, I think. As with all obfuscators, at the moment, anyway, things like variable variables, user function calls and register globals make it fail.

If you're interested, feel free to visit http://www.asistechnologies.com/home...fileinfo/id,6/ and download it. There's a bug tracker and so on there in case it's needed.

I've already started thinking about the next version: things like a web interface and the options to click a button to automatically exclude all Joomla functions, for example.

Thanks!
TwistMyArm is offline  
Old 08-27-2006, 07:25 AM   #2 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,939
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
Can domain lock and expiry date be set in this?
-Nick- is offline  
Old 08-27-2006, 01:12 PM THREAD STARTER               #3 (permalink)
NamePros Member
Join Date: May 2006
Posts: 160
TwistMyArm is on a distinguished road
 



Hi nick_mayhem:

No, it can't. Any system that does that for you requires a decoder installed on the server (different decoders for different systems).

This code requires no decoder as what is produced is normal, runnable PHP. At the same time, though, it also means that nothing can be wrapped around it (such as the license requirements that you are talking about).

If you want to use an obfuscator, while still using a licensing system, you would need to have that license code written in your PHP code (either by yourself or as an included library).
TwistMyArm is offline  
Old 08-27-2006, 10:42 PM   #4 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,939
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
Humm....

I am using one right now that has domain lock and expiry and doesn't requires any other library or decoders to be installed.

Let me know if you want to see that one. Might help you out for future developments of yours.

Thanks.
-Nick- is offline  
Old 08-28-2006, 04:37 AM THREAD STARTER               #5 (permalink)
NamePros Member
Join Date: May 2006
Posts: 160
TwistMyArm is on a distinguished road
 



Yep, for sure: would love to see it.

Even just a name is fine, thanks.
TwistMyArm is offline  
Old 08-28-2006, 07:23 AM   #6 (permalink)
I'll do it
 
-Nick-'s Avatar
Join Date: Dec 2005
Location: India
Posts: 6,939
-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness-Nick- Has achieved greatness
 


Member of the Month
September 2007
Adoption
PM sent.

Thanks.
-Nick- is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:56 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger