Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make script unreadable

Status
Not open for further replies.

mrn

MIS
Apr 27, 2001
3,993
GB
Does anyone know how to make a script unreadable.
I remember seeing a tool to compile a ksh but can't remember what it's called.
Anyone got any other methods / suggestions?

-
| Mike Nixon
| Unix Admin
-------------
 
sure, a way is edit it using vi
then exit with the 'X' cmd, :X\n
you will ask for a pass-key, and the file is
crypted, see man vi for more details,

an other way:

crypt filename

man crypt


:) guggach
 
Thanks but on AIX I have neither the X option or the crypt command.

-
| Mike Nixon
| Unix Admin
-------------
 
Thanks Ken I'll look into it.

-
| Mike Nixon
| Unix Admin
-------------
 
If you're wanting to keep prying eyes out of it in-house, you can use sudo.

1. Select or create a new user with appropriate permissions for running the script.

2. chown the script to that user.

3. chmod 700 the script

4. grant sudo privileges to the nosy people allowing them to run the script as the selected user. (see man pages for visudo and sudoers for details on how)

5. Instruct the users on how to, or create a script that does it for them, sudo the command as the other user.

sudo -u <username> /full/path/to/script

They'll then be able execute, but unable to read it.

If the script is for distribution, of course, none of this applies.

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L

 
Maybe take a look at gzexe which is one of the GNU zip (gzip) utilities. It allows you to compress scripts and have them automatically uncompress and execute when you run them. It's fairly easy to crack but should confuse inexperienced users.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top