I need to crypt a shell script (maked with korn shell) but i want that the
users of my system can run it...
Do you have an idea to make this operation?
Thanks in advance
Gianluca
- nasir
info=$(gpg -d foo.gpg 2>err |grep label)
echo "$info"
But, keep in mind, this will force a stdin passwd for the file that was
gpg. Also gpg is not avil on many OS.
OR:
Can you pass the word or even the shell via a env var. Then pass it
back out.
Some times:
To keep just any one from `more foo.sh` I use compress, then to run the
file, `zcat foo.ksh.Z
|ksh `
Just 2 cents. JB
Thanks
Gianluca
"johngnub" <john...@COX.NET> ha scritto nel messaggio
news:1121807857.6...@z14g2000cwz.googlegroups.com...
I interpret your use of "crypt" to mean "compile", not
"encrypt", which is something intrinsically different.
Gianluca, there are a variety of tools to "compile" scripts into
equivalent C source, "shroud" scripts with a binary executable shell,
or "obfuscate" the script source to discourage reuse, BUT all of
these techniques and resources either do not accomplish what you
want to do, are commercial software, or are for very specific
environments.
(Excuse me for the complex language of the above :)
Here is a list of all(?) available software that can do this.
You do not mention what your host system is, so you will have
to research and experiment yourself. I recommend "shcomp.c" as
part of the kornshell version 1993 package (free).
Reply to this newsgroup with your experience of success or
failure.
=Brian
COMPILE,"CCsh",,http://www.comeaucomputing.com/faqs/ccshfaq.html;http://www.comeaucomputing.com/tryccsh/,$$,"compile
sh(1)"
COMPILE,"shc.c",2.4;3.8,http://www.datsi.fi.upm.es/~frosal/;ftp://hpux.csc.liv.ac.uk/hpux/Languages/shc-2.4a,$0,"script
shrouder","Francisco Javier Rosales García" <fro...@fi.upm.es>
COMPILE,"shcomp.c",,<ast-ksh>/src/cmd/ksh93/{DESIGN,README,sh/shcomp.c},$0,"compile
ksh93 script","David G. Korn" <d...@research.att.com,d...@bell-labs.com>
COMPILE,"Shell
Protector",,http://www.bungisoft.com/html/purchase.html,$0,"compile
sh(1): NCA","Francisco Javier Rosales García" <fro...@fi.upm.es>
COMPILE,"Shell-Lock",,http://www.cactus.com/shellock.html;http://seclists.org/lists/bugtraq/1999/Oct/,$$,"compile
sh(1): NCA"
COMPILE,"ShellGuard;fstsg",0.2,http://www.fstha.com/sg.html,$0,"turn
shell (any) script into binary",<in...@fstha.com>
COMPILE,"wzshSDK",,http://wzce.tripod.com/wzsh.html,$$;/etc/wzshSDK.lic:Q420030915:fzRm2GospKi7UeyZ2EdWK0:DEMO4.4;KEY:177016496aa9ac0cb15322228117137d,"compile/encrypt
shellscript (Body:Apply for wzsh DEMO)","Roger Gong"
<wz...@hotvoice.com>
> I need to crypt a shell script (maked with korn shell) but i want that the
> users of my system can run it...
> Do you have an idea to make this operation?
ksh93, available from http://www.research.att.com/sw/download/
(package ast-ksh) contains shcomp, a utility that compiles ksh93
scripts to an intermediary (ie unreadable) format.
Whether this will work for your version of ksh I don't know, but you
can install ksh93 if the feature is important to you (there are
binaries for quite a few OSes on the AT&T site, but compiling from
source is pretty straightforward).
Take care,
--
Stefaan
--
As complexity rises, precise statements lose meaning,
and meaningful statements lose precision. -- Lotfi Zadeh
I wrote a shell script obfuscator:
http://comp.eonworks.com/scripts/obfsh
--
Dawid Michalczyk
http://www.art.eonworks.com
There is a tool called 'shc' specially designed for this purpose. Its
homepage is at http://www.datsi.fi.upm.es/~frosal/
--
Andrew Smallshaw
and...@sdf.lonestar.org