Slightly_Imperfect
asked on
encrypt a shell script
Is there anyway of encrypting a shell script so that no one can look at it ?
whilst it can still run as usual ?
just curious cheers
whilst it can still run as usual ?
just curious cheers
ASKER
The reason we are after doing this is so the customer cannot get at our code !!!!
i was thinking of uuencode or something similar !!!! then a c program just to go out and run the command so as nobody would see the code !!!
i was thinking of uuencode or something similar !!!! then a c program just to go out and run the command so as nobody would see the code !!!
Does anyone know of a utility out there that might compile shell scripts?
Well if you really don't want a customer to get at the code then it needs to be a compiled program, not a script. As I mentioned, at some point in the scripts execution (assuming the use of a standard shell) the commands must exist as plain text. Even a moderately clever customer would be able to recover those commands pretty easily.
The only way that I can thing of other than compiled code to really hide what you are doing would be to use a modified shell that could read the encrypted script directly. In that case the crypto key could be hidden in the shell executable, so the script would be pretty secure.
The only way that I can thing of other than compiled code to really hide what you are doing would be to use a modified shell that could read the encrypted script directly. In that case the crypto key could be hidden in the shell executable, so the script would be pretty secure.
A compiled program can also be disassembled, If you really want to keep the code secure, you may want to use a protocol that only allows running the code, and not reading it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have found a freeware shell script compiler called shc if anybody wants it
go to msn search and type shell script compiler !!!
you should have a page from someone called francisco rosales garcia
it is in gzip format !!! it works reaaly well !!!
cheers guys !!!
go to msn search and type shell script compiler !!!
you should have a page from someone called francisco rosales garcia
it is in gzip format !!! it works reaaly well !!!
cheers guys !!!
Does this compiler work for UNIX OS's, or just Winders.
ASKER
I have found a freeware shell script compiler called shc if anybody wants it
go to msn search and type shell script compiler !!!
you should have a page from someone called francisco rosales garcia
it is in gzip format !!! it works reaaly well !!!
cheers guys !!!
go to msn search and type shell script compiler !!!
you should have a page from someone called francisco rosales garcia
it is in gzip format !!! it works reaaly well !!!
cheers guys !!!
ASKER
It says it works on all unix backgrounds !! not to sure but it works on HP-UX.
The difficulty with all of these is that the decrypt key will have to come from somewhere and that a somepoint the plain text has to exist. A clever user could find the key or intercept the plain text to see what the script contents are.
Like most things in Unix there's probably another way to solve the problem. Why exactly would you want to have the contents of the script hidden?