We help IT Professionals succeed at work.

How to obfuscate source code and ONLY the source code?

Last Modified: 2013-12-17
It seems that most obfuscators affect only the compiled assembly.  I am looking for something that will create an obfuscated copy of the source code (with some throttle ability as to how much obfuscation is applied).  I am in a Catch-22 with someone who has not upheld their end of an agreement (due to illness, not by intent).  That person needs a compilable copy of the source code on-hand in order to be eligible to receive imminent additional funding from a Fortune 500 company (at which point I finally get paid). My goal is to make it difficult to work with the source code unless I am involved.  All of this is out in the open between myself and the other person (nothing unethical).
Watch Question

Why would he need compilable source code?  Surely he would just need object code... i.e. the compiled code.  This should prove concept and that a product was there.   What you are asking is almost impossible - the point in source code is that it is that.  If you obfuscate it, the compiler doesn't understand it, it needs to be unobfuscated to compile.  So unless someone writes a compiler with built in de-obfuscation, you can't do it.

Build the app and pass that to him.  It should be all he needs.  I'd be distrustful otherwise without very good reasons, and if the reasons were good enough, I'd expect to be there with the source code, not just hand it over...


The funding company requires proof that compilable source code is under his control.  Then they will the provide funding.  I trust this person, but then again he is very ill.  

What I don't trust is what will happen to the source code if he is unable to manage the situation.  

I was simply looking for a way (changing variable names, method names, namespace names, etc) to make the logic a bit more difficult to follow.  

However, it is not just a simple matter of making global replaces.  A smart agent of some sort (something that understands code organization) is required.  Otherwise, problems arise.

Hopefully that clears things up.
As you have found and posted the solution, the question should be PAQed with points refunded.  This way other users searching the site will see the question and the solution you have found.
This one is on us!
(Get your first solution completely free - no credit card required)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.