Avatar of stgreenwalt
 asked on

How to obfuscate source code and ONLY the source code?

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).
.NET ProgrammingSoftwareVisual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon

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.
Your help has saved me hundreds of hours of internet surfing.

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.