Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Copy protection of a korn-shell script

Posted on 2003-10-28
Medium Priority
Last Modified: 2013-12-26
We have developed a korn shell script that we would like copy protect the source code. What kind of options do we have? The script is quite lenghy and it is not a preferred solution to rewrite it into a compiled language.

This is urgent for us.

Question by:rgustavs
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
LVL 18

Expert Comment

ID: 9632943
Don't think you can!
Unless you did something like:
encrypt the script
create a small wrapper program, which would be compiled, that un-encrypts the script, and runs it.
However I'm not sure that this would prevent someone ploughing through truss outputs to read the script.

Author Comment

ID: 9633165
I got an answer from another source proposing that I'll use sc-bind from http://www.al-williams.com/free/. It is a c-program that implements the logic that liddler proposes. I have aslo got suggestions to use

shell-lock http://www.cactus.com/products/cactus/shell-lock.html
ccsh http://www.comeaucomputing.com/faqs/ccshfaq.html

I'll get back with comments on sc-bind. We are testing it now.


Expert Comment

ID: 9634424
Are you selling this script?

If you will use that inside your company, then you could use only chmod command to change permission
LVL 48

Expert Comment

ID: 9637220
Depends on what level of "protection" you require.  I think a good chunk of the Perl FAQ is particularly relevant here:

  How can I hide the source for my Perl program?
            Delete it. :-) Seriously, there are a number of (mostly
            unsatisfactory) solutions with varying levels of ``security''.

            First of all, however, you *can't* take away read permission,
            because the source code has to be readable in order to be
            compiled and interpreted. (That doesn't mean that a CGI script's
            source is readable by people on the web, though--only by people
            with access to the filesystem.) So you have to leave the
            permissions at the socially friendly 0755 level.

            Some people regard this as a security problem. If your program
            does insecure things and relies on people not knowing how to
            exploit those insecurities, it is not secure. It is often
            possible for someone to determine the insecure things and
            exploit them without viewing the source. Security through
            obscurity, the name for hiding your bugs instead of fixing them,
            is little security indeed.

            You can try using encryption via source filters (Starting from
            Perl 5.8 the Filter::Simple and Filter::Util::Call modules are
            included in the standard distribution), but any decent
            programmer will be able to decrypt it. You can try using the
            byte code compiler and interpreter described below, but the
            curious might still be able to de-compile it. You can try using
            the native-code compiler described below, but crackers might be
            able to disassemble it. These pose varying degrees of difficulty
            to people wanting to get at your code, but none can definitively
            conceal it (true of every language, not just Perl).

            It is very easy to recover the source of Perl programs. You
            simply feed the program to the perl interpreter and use the
            modules in the B:: hierarchy. The B::Deparse module should be
            able to defeat most attempts to hide source. Again, this is not
            unique to Perl.

            If you're concerned about people profiting from your code, then
            the bottom line is that nothing but a restrictive license will
            give you legal security. License your software and pepper it
            with threatening statements like ``This is unpublished
            proprietary software of XYZ Corp. Your access to it does not
            give you permission to use it blah blah blah.'' We are not
            lawyers, of course, so you should see a lawyer if you want to be
            sure your license's wording will stand up in court.
LVL 24

Accepted Solution

shivsa earned 2000 total points
ID: 9639283
Here is a shell script compiler, It might be handy and also it is  Free.



Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

604 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