Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, Need to convert a shell script to a binary executable form,so that script is not readable and should not be modifiable. I used shc (the shell script compiler) , ...
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    15

    convert shell script to binary executable

    Hello,

    Need to convert a shell script to a binary executable form,so that script is not readable and should not be modifiable.

    I used shc (the shell script compiler) , but shc is not working in cygwin.
    I am using Cygwin as the linux simulator .

    Is there any alternative method in cygwin.

    Thanks in advance

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    658
    As a rule, trying to compile or encrypt shell scripts so they remain executable is a losing proposition. Can you tell us what you are trying to achieve and we might be able to help you with a better option.

    Most of the time these questions crop up because the person has written a script with embedded user/password information and wants to let users run the script without being able to get access to the credentials.

    The problem is that the script has to remain completely recoverable before it can be run (even if you use shc) so a reasonably skilled/determined attacker can recover the original script.

    A better option is to use Linux's built in access controls. Give the user no access to the script directly, but configure sudo so they can execute it.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...