This is a discussion on HOW TO: Shell Script crypting within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi All Can I hide the code and deliver the shell script so that nobody else can change or ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| On 2005-07-19 16:02:59 -0500, "Gianluca S." <gianluca2@email.it> said: > Hi All > > Can I hide the code and deliver the shell script so that nobody else > can change or view that. > > Thanks in advance for the answer. > Gianluca > No. It's a text file anyway. If you're mastering shell scripting you can produce an obfuscated code, but it's really difficult. -- Sensei <senseiwa@tin.it> cd /pub more beer |
| |||
| Despite all prevention efforts, Sensei <senseiwa@tin.it> wrote in news:dbjqkj$ajf$2@news.doit.wisc.edu: > On 2005-07-19 16:02:59 -0500, "Gianluca S." <gianluca2@email.it> said: > >> Hi All >> >> Can I hide the code and deliver the shell script so that nobody else >> can change or view that. >> >> Thanks in advance for the answer. >> Gianluca >> > No. It's a text file anyway. > > If you're mastering shell scripting you can produce an obfuscated code, > but it's really difficult. > Perhaps I'm missing something (not in front of my AIX box at the moment), but can't you just make the script executable (chmod +x) and not readable (chmod -r) to your users? -- Slor |
| |||
| Too simple!! :-) Gianluca "Slor" <slor@comcast.net> ha scritto nel messaggio news:1121811165.8ade102a908c96145815dce8079b57c8@t eranews... > Despite all prevention efforts, Sensei <senseiwa@tin.it> wrote in > news:dbjqkj$ajf$2@news.doit.wisc.edu: > >> On 2005-07-19 16:02:59 -0500, "Gianluca S." <gianluca2@email.it> said: >> >>> Hi All >>> >>> Can I hide the code and deliver the shell script so that nobody else >>> can change or view that. >>> >>> Thanks in advance for the answer. >>> Gianluca >>> >> No. It's a text file anyway. >> >> If you're mastering shell scripting you can produce an obfuscated code, >> but it's really difficult. >> > > Perhaps I'm missing something (not in front of my AIX box at the moment), > but can't you just make the script executable (chmod +x) and not readable > (chmod -r) to your users? > > -- > Slor |
| |||
| On 2005-07-19 17:12:43 -0500, Slor <slor@comcast.net> said: > Perhaps I'm missing something (not in front of my AIX box at the > moment), but can't you just make the script executable (chmod +x) and > not readable (chmod -r) to your users? You cannot execute something you cannot read: username@aixserver:~$ cat a.sh #!/bin/sh echo "Hi!" echo username@aixserver:~$ ls -l a.sh -rw-r--r-- 1 username usergrp 26 Jul 20 00:47 a.sh username@aixserver:~$ chmod a-r a.sh username@aixserver:~$ chmod a-w a.sh username@aixserver:~$ chmod a+x a.sh username@aixserver:~$ ls -l a.sh ---x--x--x 1 username usergrp 26 Jul 20 00:47 a.sh* username@aixserver:~$ ./a.sh /bin/sh: /afs/cell.name/user/u/username/a.sh: 0403-016 Cannot find or open the file. username@aixserver:~$ uname -a AIX aixserver 2 5 0053447A4C00 username@aixserver:~$ -- Sensei <senseiwa@tin.it> cd /pub more beer |
| |||
| That trick (execute but no read) works for binaries, but not shell scripts since you really execute the shell binary (/bin/ksh for example) which then has to read the shell script (a.sh). It does this as your user id. you could try using perl and the perl compiler |
| |||
| Gianluca S. wrote: > Hi All > > Can I hide the code and deliver the shell script so that nobody else can > change or view that. > > Thanks in advance for the answer. > Gianluca I use a thrid party program called shell-lock from Cactus software. I then keep the source in a RCVS. You can't totally get rid of the source. |
| |||
| On 2005-07-20 03:45:58 -0500, "Adrian Bridgett" <adrian.bridgett@gmail.com> said: > > you could try using perl and the perl compiler He asked for a shell script anyway. He could use python, lisp, C, whatever, but he wouldn't have a shell script -- Sensei <senseiwa@tin.it> cd /pub more beer |
| |||
| Hi Gianluca, Try Shell-Lock from Cactus (like tmpolzin mentioned). It has worked well for us on AIX 4.3, 5.1, and 5.2 so far. They probably have a newer version, but here is thedetails on the copy we are using: SHELL-LOCK(tm) Shell Script Security Software Copyright (C) 1989-1998 Cactus International, Inc. (Version: 1.6.2 1/2/98) btw - we did have a version that used to leave the shell script compiled until you ran the script. Then it would uncompile it in the /tmp directory and (lo and behold) the user had the source to look at again. Version 1.6.2 does not do this anymore, or at least I can't find where it uncompiles it to. ;-) Steve |
| ||||
| The problem is: I can't find the download link of "shell-lock" software!! I have serached by google ...without success!! Can you send me a copy of it or a valid link? Many Thanks Gianluca steven_nospam at Yahoo! Canada ha scritto: > Hi Gianluca, > > Try Shell-Lock from Cactus (like tmpolzin mentioned). It has worked > well for us on AIX 4.3, 5.1, and 5.2 so far. They probably have a newer > version, but here is thedetails on the copy we are using: > > SHELL-LOCK(tm) > Shell Script Security Software > Copyright (C) 1989-1998 > Cactus International, Inc. > (Version: 1.6.2 1/2/98) > > > btw - we did have a version that used to leave the shell script > compiled until you ran the script. Then it would uncompile it in the > /tmp directory and (lo and behold) the user had the source to look at > again. Version 1.6.2 does not do this anymore, or at least I can't find > where it uncompiles it to. ;-) > > Steve |