Sunday, December 9, 2007

How to protect a shell script

Q: I have written a lengthy shell script (more than 1000 lines) and all the sys.admins in my company use that script and it runs as root. My concern is what if some sys.admin just add a "rm -r /" in the script which might jeopardize my whole efforts. Is there a way to convert a shell Script to an exe file ? or some other way so that others cannot see the code ? If u know pls. share.

Generic shell script compiler(shc) creates a stripped binary executable version of the script specified with -f on the command line. (shc encrypts shell scripts using RC4)

Get SHC from :
DEBIAN: apt-get install shc

$ shc -f

It will generate following two files # Generated C source code of # The binary version of

share "" with your friends, which is a executable and encrypted one.

Note: Paranoid Penguin - Limitations of shc, a Shell Encryption Utility

1 comment:

MEWIJEIT said...

Thanks dude..........

© Jadu Saikia