How to run a script, but not let user see code?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to run a script, but not let user see code?
# 1  
Old 03-17-2015
How to run a script, but not let user see code?

Hi,

I want to deploy a (perl) script, in Linux. (Red Hat 7).

Is there a way to protect the script itself from being viewed by the user, but still allow the user to run the script?

I dont want the user to be able to see the source code of the script.
# 2  
Old 03-17-2015
Sort of. You can obfuscate the code making it beyond difficult to read unless you know about Wily Coyote and the guys at CPAN. Check out acme::bleach, acme::buffy, and acme::eye_drops. The last one NOT requiring the acme::eye_drops module to run the obfuscated code. buffy & bleach have to run the Frankenstein code they generated.

Cartoons are always more fun than coding, except when coding creates cartoons....
# 3  
Old 03-17-2015
Hi.

See also https://metacpan.org/pod/pp

Note that one option may be very useful:

Code:
       -f, --filter=FILTER
           Filter source script(s) with a PAR::Filter subclass.  You may
           specify multiple such filters.

           If you wish to hide the source code from casual prying, this will
           do:

               % pp -f Bleach source.pl

           If you are more serious about hiding your source code, you should
           have a look at Steve Hay's PAR::Filter::Crypto module. Make sure
           you understand the Filter::Crypto caveats!

I have used pp, but not for hiding ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Su to another user to run script

I have a script ( the name is /tmp/script1) , the content is simple , just copy a file to another directory . Now I would like every user will change to a specific user ( eg. userA ) before run this script so that the script will be run by userA , that mean I want only userA run this script , I... (2 Replies)
Discussion started by: ust3
2 Replies

2. UNIX for Dummies Questions & Answers

How to allow a different user to run a script

Hi I have a script that i would like to be run by a different user. For example, I have a file called 'mytest.pl' created by user 'user4' What command should i use to make sure that user 'ydanial' has ability to run 'mytest.pl' ? Thanks (6 Replies)
Discussion started by: DallasT
6 Replies

3. Shell Programming and Scripting

Run SAME SCRIPT as different user

Dear all, i am doing an SVN backup script. Almost done. My problem is : Script should run by user : svn There is a chance to run the script by root itself.. so i coded like following #This script path and name ... (2 Replies)
Discussion started by: linuxadmin
2 Replies

4. Shell Programming and Scripting

Run the script as other user

hello all There are files on host1 which need to sftp'd to host2 everyday. user 'yyy' has his dsa keys set up on host 1 and host 2 . If user 'yyy' executes the below query without 'su' part, then all files are transferred. Now user 'xxx' wants to run the script and transfer the files, but he... (5 Replies)
Discussion started by: vasuarjula
5 Replies

5. AIX

Run script by another user

Guy's I have script to start the data base and this script need to be excited by Oracle user Is there any command to be excited by root and to run this script Start_Oracal_DB.sh by Oracle user Pls Advice … Excessive formatting removed. I have told you so on several occasions now and... (2 Replies)
Discussion started by: Mr.AIX
2 Replies

6. AIX

Run script with different user at the startup ..

Run script with different user at the startup .. I have created this user appuser And I have a script should to be up thru the startup by this user appuser I have defined the path of the script /user/appstart.sh in /etc/rc But at the startup starting will be by root , I’d like to keep... (6 Replies)
Discussion started by: Mr.AIX
6 Replies

7. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

8. Shell Programming and Scripting

Run the script from another user

Hello Experts I want to run script from another user in unix . Also the script has been calling from SQL. HOST command helps to call the unix file from sql . But my problem is the unix script has to be run by another user. I tried tht following $ sudo su - user2 -c who... (4 Replies)
Discussion started by: Krishnaramjis
4 Replies

9. Shell Programming and Scripting

Have script run as a different user

Hi all, I'm a newbie to the Linux world. I have a script that needs to run under "UserB". But I don't want to give out the password to UserB. Is there a way to setup the script to run as "UserB" when UserA runs it. Thanks in advance for your assistance. (1 Reply)
Discussion started by: mikey20
1 Replies

10. UNIX for Dummies Questions & Answers

run a script with another user id

Hi, I have a script A.run which will call B.run. How can i run B.run with a common id instead of using my login id? I have tried as below, in Script A.run : ......... echo "Running B.run......" rsh -l commonid hostname B.run ......... but it's give me "Permission Denied"....... ... (3 Replies)
Discussion started by: wan
3 Replies
Login or Register to Ask a Question