Operating System - HP-UX
1830944 Members
2207 Online
110017 Solutions
New Discussion

Re: Crypt & Encrypt a script

 
SOLVED
Go to solution

Crypt & Encrypt a script

Hi All!

Need your assistant on how to encrypt the korn shell script then how other users able to run the script and also protect from others users to view the script.

TQ & Regards
9 REPLIES 9
Massimo Bianchi
Honored Contributor
Solution

Re: Crypt & Encrypt a script

Use the Shell compiler program,
shc.


Download from

http://hpux.connect.org.uk/

Massimo

Re: Crypt & Encrypt a script

The site requires username & password, please advise

TQ
Massimo Bianchi
Honored Contributor

Re: Crypt & Encrypt a script

Damn!

You are right. Untill wednsday it was a free site, and it has been for years...

Well,
i will attach the depot the same
Massimo Bianchi
Honored Contributor

Re: Crypt & Encrypt a script

man page
Robert-Jan Goossens
Honored Contributor

Re: Crypt & Encrypt a script

John Meissner
Esteemed Contributor

Re: Crypt & Encrypt a script

You can also download from the authors home page:

http://www.datsi.fi.upm.es/~frosal/frosal.html

I use shc alot on my scripts. It's really a great product
All paths lead to destiny

Re: Crypt & Encrypt a script

Dear Robert Jan,
I had installed successfully the shc-2.4a to my HPUX 11.00.

Then I run the following command :
# shc -f world.sh
Giving me the following error, please advice.

(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: "world.sh.x.c", line 13: error 1716: Automatic aggregate initialization is an ANSI feature.
(Bundled) cc: "world.sh.x.c", line 13: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "world.sh.x.c", line 13: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "world.sh.x.c", line 13: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "world.sh.x.c", line 13: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "world.sh.x.c", line 13: error 1705: Function prototypes are an ANSI feature.
(Bundled) cc: "world.sh.x.c", line 13: error 1705: Function prototypes are an ANSI feature.
shc: Error 0

Regards
Umapathy S
Honored Contributor

Re: Crypt & Encrypt a script

Kamar,
You are using the bundled /usr/ccs/bin/cc which is capable only to compile kernels. You need to have a ANSI/C compiler such as HP/C or GCC.

Otherwise you can get the depot itself and install it.
http://hpux.cs.utah.edu/ftp/hpux/Shells/shc-2.4a/shc-2.4a-sd-11.00.depot.gz

HTH,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!

Re: Crypt & Encrypt a script

TQ to all,

Now I managed to make my script executable/binary and can't be viewed by others.

Regards