Web Hosting Talk







View Full Version : encoding a bash script


BMurtagh
04-12-2003, 10:24 AM
hello, i was wondering if there was a way to encode a bash script so the source cannot be seen as plain text. the reason for this is that i've coded a half-life game server installer awhile back and someone is using outside it's intended purpose for his company and not outside that because i don't find that right, but that's for another section on here for my complaining. anyways, i need to know if i can encode the bash script source so it cannot be read, but still can be executed in the encoded version.

sasha
04-12-2003, 10:35 AM
In a way yes, and in a way no. You could use bash script as a reference as you are writing perl, c or cpp script, which can be compiled.

BMurtagh
04-12-2003, 10:38 AM
but i can't encode it with something like those cheap javascript encoders you see online? :(

jb4mt
04-12-2003, 10:58 AM
Originally posted by LogicBrendan
but i can't encode it with something like those cheap javascript encoders you see online? :(

Isn't the only thing a javascript "encoder" does is remove comments and white space and run everything together in one long string?

X-Istence
04-12-2003, 01:50 PM
Originally posted by jb4mt
Isn't the only thing a javascript "encoder" does is remove comments and white space and run everything together in one long string?

no, most of the time it formats it in such a way or puts the code in such a way that the java engine on the PC running it will know what to do, but to us its unreadable.

BMurtagh
04-12-2003, 02:39 PM
so there's nothing like that?

jb4mt
04-12-2003, 03:52 PM
Originally posted by X-Istence
no, most of the time it formats it in such a way or puts the code in such a way that the java engine on the PC running it will know what to do, but to us its unreadable.

There's no polite way to put this:

WRONG

Java and Javascript ARE NOT the same thing.

jb4mt
04-12-2003, 03:54 PM
Originally posted by LogicBrendan
so there's nothing like that?

typically there isn't for interpreted languages. typically. I'm sure somebody can point out exceptions, but I don't no any off the top of my head, not for Bash.

BMurtagh
04-12-2003, 03:54 PM
ok, thanks anyways. this now offically sucks :(

BMurtagh
04-12-2003, 03:57 PM
question, since you can run php scripts from the command line, could i put the bash script into a php file then use zend encoder and encode it and run it that way?

sasha
04-12-2003, 04:49 PM
You could, but then you assume that there is binary php compiled on target system and you assume that there is zend module installed. If target system is gaming server, that might be too much assuming. But, you could do the same thing in perl, and chances are there are no many *nix boxes without perl.

BMurtagh
04-12-2003, 04:51 PM
blah, i thought that would was a good way too. life sucks. :(

BMurtagh
04-12-2003, 04:52 PM
know of a perl encoder? :P

sasha
04-12-2003, 04:54 PM
perlcc, compiler, not encoder.

BMurtagh
04-12-2003, 04:57 PM
would i re-write it in perl and then use perlcc on it or can i use the .sh and the perlcc will handle it?

rusko
04-12-2003, 06:47 PM
write one yourself, it isnt that hard. alternatively, hack bash a little bit to do encryption/decryption and provide the bash with the script.

paul

BMurtagh
04-12-2003, 06:54 PM
sorry, i'm not the professional bash scripter you must be. thanks for your wonderful encouragement and help. it really was a great idea. *sarcasm*

innova
04-14-2003, 03:29 PM
This have anything to do with Exodus Control Panel?

I noticed you are a forum mod.. and that the forum has disappeared.

innova
04-14-2003, 03:29 PM
This have anything to do with Exodus Control Panel?

I noticed you are a forum mod.. and that the forum has disappeared.

BMurtagh
04-14-2003, 06:15 PM
no, this is a seperate project. i don't help out on exoCtl, my partner and logicserver's CEO does help with support and such, but he's not a developer.