LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2005, 08:16 AM   #1
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
Compile/Encrypt Bash Script


Hey all...

I've done some freelance work on a project for a company, and other companies are interested in acquiring the work.

The project involved bash scripts and a web interface. I'd like to package the "product" and protect my source code. That is, compile it or at least scramble or "obfuscate" (i think the word is) it so as to prevent any stealing of my source.

Can this be done? If yes, how?

Is this necessary?

Thanx
 
Old 10-07-2005, 08:28 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Have a look at this thread which was about essentially the same question:

http://www.linuxquestions.org/questi...hreadid=370328
 
Old 10-08-2005, 11:39 AM   #3
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
A standard clause in most DBA / integrator contracts is:

Any scripts introduced by the "provider" for use in the "client"s "application" are owned solely by the "provider" and leased to the "client" for use with the "application" for the duration of the contract / in perpetuity.

What it means is that if the provider walks out of the contract, the client is protected but can't use the scripts anywhere else.

End
 
Old 10-08-2005, 12:14 PM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
There is a program called shc which will encode a shell script into a binary stream but only as long as the maximum one-line command size (+-512 chars?)
 
Old 10-08-2005, 01:52 PM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally posted by AnanthaP
A standard clause in most DBA / integrator contracts is:

Any scripts introduced by the "provider" for use in the "client"s "application" are owned solely by the "provider" and leased to the "client" for use with the "application" for the duration of the contract / in perpetuity.

What it means is that if the provider walks out of the contract, the client is protected but can't use the scripts anywhere else.

End
SCO might argue with you about the ability of contracts to protect your code - IBM on the other hand might agree
 
Old 10-08-2005, 09:09 PM   #6
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
It would be easy to crack as long as /bin/bash could be replaced with /bin/cat, so system() isn't the best way.
 
Old 10-09-2005, 07:33 PM   #7
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Original Poster
Rep: Reputation: 30
Thanx alot for the responses...

The other thread was an interesting help; didn't turn up in my own searched though...

Looking to try out shc
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
encrypt and decrypt using encrypt(char block[64], int edflag) rockwell_001 Linux - Security 3 08-30-2009 09:16 AM
Bash script to compile kernel Keffin Programming 6 05-03-2004 06:31 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 12:20 AM
bash script - incrementing a filename in a script tslinux Programming 10 08-05-2003 11:58 PM
bash script prob: how can i tell the script that a 'dd' has finished? Frustin Linux - General 2 04-02-2003 05:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration