Popular recipes tagged "obfuscation"http://code.activestate.com/recipes/tags/obfuscation/2014-12-19T20:01:30-08:00ActiveState Code RecipesObfuscation In Bash Shell. (Bash) 2014-12-19T20:01:30-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578986-obfuscation-in-bash-shell/ <p style="color: grey"> Bash recipe 578986 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/bash/">bash</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/obfuscation/">obfuscation</a>). </p> <p>IMO, the immense power of the shell...</p> <p>Please let me know if there is any other human readable language that can do this...</p> <p>The DEMO code below was an idea I formed to see how to make a bash script very difficult to hack.</p> <p>Everything in it is made easy to read so as to see this idea working.</p> <p>It uses bash variables ONLY and although I have used bash loops to create the variables in this DEMO you could create your own set of variables and 'source' them to the the obfuscated code before running the main body of the code.</p> <p>It also goes without saying that you could obfuscate the changing of any or all the variable allocations at any time AFTER the code runs to make it even more obfuscated and as may times as you wish...</p> <p>I would be seriously difficult to actually write a lsrge bash app' using this method but boy oh boy would it be fun?!?</p> <p>Testbed:- Macbook Pro, OSX 10.7.x and above, using default bash terminal...</p> <p>LBNL, yeah I am aware of 'eval' but as it is obfuscated and can have as many obfuscated variables as I wish allocated to it then why worry... ;o)</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <p>Bazza...</p>