[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

complie/hide  csh script

Posted on 2001-07-26
3
Medium Priority
?
274 Views
Last Modified: 2013-12-27

I have a csh script that I do not want users to view/read permission on it. Is there any way I can make a binnary  a binary file of it or encrypt/black-box like it..

0
Comment
Question by:raza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Expert Comment

by:paulqna
ID: 6326068
Of course chmod 700 gives only the owner and root permission to read/write/execute the file, but if this is not what you're looking for you can encrypt the file using the crypt command or install pgp.

http://pgpdist.mit.edu/distserver/PGPcertsrv_2.5.8_Sol_FW.tar.gz
0
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 100 total points
ID: 6326926
I'm guessing you've embedded passwords in your script or some such.

Instead try putting the passwords in a data file and making the script setgid to a group that is used for nothing but controling access to that file.

The ony way to make a CSH script itself non-readible is if you do something similar with a suid/sgid wrapper that executes the actual CSH script, so it's no easier.

As for compiling the script, I'm not aware of any CSH compilers.

I have seen some SH and KSH compilers, and there's a feature in KSH for dumping/restoring the parse tree, which gives similar effect.  But nothing for CSH.

But meanwhile, this doesn't really help anyway since the determined attacker would just get a dis-assembler and de-compiler and figure out what's going on anyway.  And if you only want that level of protection, you can obscure the sensitive data within your existing CSH script.  Something like like store it XOR'd and then XOR it back to the original right before using it.  This won't stop someone from analyzing the code and figuring out what's going on, but at least the strings won't directly appear in the script.
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 6579036
Umm, I hate to sound ungrateful, but why did you give this answer a 'C' grade?  It's extremely complete and well thought out.  The fact that it doesn't solve your (narrowly defined) problem indicates that your problem may be insolveable.  Don't feel too bad, though, the record companies are still learning this lesson about bits being inherently copyable too.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question