Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 166689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:08:31+00:00 2026-05-11T12:08:31+00:00

Update2: Thanks for the input. I have implemented the algorithm and it is available

  • 0

Update2:

Thanks for the input. I have implemented the algorithm and it is available for download at SourceForge. It is my first open source project so be merciful.

Update:

I am not sure I was clear enough or everyone responding to this understands how shells consume #! type of input. A great book to look at is Advanced Unix Programming. It is sufficient to call popen and feed its standard input as demonstrated here.

Original Question:

Our scripts run in highly distributed environment with many users. Using permissions to hide them is problematic for many reasons.

Since the first line can be used to designate the ‘interpreter’ for a script the initial line can be used to define a a decrypter

#!/bin/decryptandrun *(&(*S&DF(*SD(F*SDJKFHSKJDFHLKJHASDJHALSKJD SDASDJKAHSDUAS(DA(S*D&(ASDAKLSDHASD*(&A*SD&AS ASD(*A&SD(*&AS(D*&AS(*D&A(SD&*(A*S&D(A*&DS 

Given that I can write the script to encrypt and place the appropriate header I want to decrypt the script (which itself may have an interpreter line such as #!/bin/perl at the top of it) without doing anything dumb like writing it out to a temporary file. I have found some silly commercial products to do this. I think this could be accomplished in a matter of hours. Is there a well known method to do this with pipes rather than coding the system calls? I was thinking of using execvp but is it better to replace the current process or to create a child process?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:08:31+00:00Added an answer on May 11, 2026 at 12:08 pm

    If your users can execute the decryptandrun program, then they can read it (and any files it needs to read such as decryption keys). So they can just extract the code to decrypt the scripts themselves.

    You could work around this by making the decrtyptandrun suid. But then any bug in it could lead to the user getting root privileges (or at least privileges to the account that holds the decryption keys). So that’s probably not a good idea. And of course, if you’ve gone to all the trouble of hiding the contents or keys of these decryption scripts by making them not readable to the user… then why can’t you do the same with the contents of the scripts you’re trying to hide?

    Also, you can’t have a #! interpreted executable as an interpreter for another #! interpreted executable.

    And one of the fundamental rules of cryptography is, don’t invent your own encryption algorithm (or tools) unless you’re an experienced cryptanalyst.

    Which leads me to wonder why you feel the need to encrypt scripts that your users will be running. Is there anything wrong with them seeing the contents of the scripts?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 89k
  • Answers 89k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is what I have been using in all of… May 11, 2026 at 5:51 pm
  • Editorial Team
    Editorial Team added an answer It's difficult to impossible to do without a plugin since… May 11, 2026 at 5:51 pm
  • Editorial Team
    Editorial Team added an answer If the two machines are connected via the network your… May 11, 2026 at 5:51 pm

Related Questions

Brief description of requirements (Lots of good answers here, thanks to all, I'll update
I'd like to get access to the current executing Controller so I can offload
I new to Scrum and while I understand the team concept behind the Sprints,
I have a form with a textarea. Users enter a block of text which

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.