?

Log in

No account? Create an account

Previous Entry | Next Entry

Protecting 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.

A:
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 : http://www.datsi.fi.upm.es/~frosal/
DEBIAN: apt-get install shc

$ shc -f sundays.sh

It will generate following two files
sundays.sh.x.c  # Generated C source code of sundays.sh
sundays.sh.x # The  binary  version of sundays.sh

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

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

Profile

jaduks
Jadu Kumar Saikia

Latest Month

January 2008
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  
Powered by LiveJournal.com
Designed by chasethestars