Re: How to encrypt shell scripts on Unix

  • From: "Radoulov, Dimitre" <cichomitiko@xxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 11 Oct 2006 17:45:21 +0200

> I am interested in knowing if anyone has successfully encrypt their
> shell scripts (particularly on Solaris) that contained sensitive
> information (passwords, etc..) and how did they do it.


You can use ShellGuard (www.fstha.com):

$ uname -a
SunOS ess038 5.8 Generic_117350-02 sun4u sparc SUNW,Ultra-60
$ cat script.sh
#!/usr/bin/ksh
sqlplus -S << !
test/test
set pages 0 feed off
select sysdate from dual;
!
$ fstsg script.sh
ShellGuard 0.2
Foundation Software Tools
http://www.fstha.com
Using: /usr/local/bin/gcc
Compiling  /app/oracle/scripts/fstsg.0.2/script.sh.x
$ ./script.sh.x
11-OCT-06
$ strings  script.sh.x | grep test
$


Be aware that on some systems the *shell code* or some part of it is visible 
via the ps command while the script is running ... (not sure if that was the 
case for shc or Shell Guard). 


Regards
Dimitre




Other related posts: