Binary conversion....?
hi
i have written shell scripts and i want to convert all these to binary. So please tell me how can i convert these shell scripts into binary files. I am using RedHat 7.0 and 3.0. |
Quote:
Seriously, you don't say what the scripts are written in now, what you're trying to do, or what programming language(s) you know. You say you want a 'binary' file...do you mean an encoded file that no one else can edit, or a compiled executable??? |
Well if you wrote them in bash, there is no converting them to binary, there is no bash compiler. However, you can rewrite them in C or C++ and then compile them ... it will be rather difficult tho. But, why do you want to do this ? Are you sure you want to ?
|
There is something called ccsh available if you want to do bash >>> C
http://www.comeaucomputing.com/faqs/ccshfaq.html |
man shc
shc creates a stripped binary executable version of the script specified with -f on the command line. http://www.datsi.fi.upm.es/~frosal/sources/shc.html http://www.linuxsecurity.com/content/view/117920/171/ http://packages.debian.org/source/lenny/shc |
Quote:
EDIT: Darn, it isn't free ... |
Quote:
Quote:
|
There are some bash compilers around. But as far as I know, all that these do is to write a program that in turn, dumps the script into a temporary file and then run it. I might very well be wrong, but I don't think so.
If all you want is to hide the code, then these techniques are not exactly the best way to proceed because anyone should be able to look into that temporary file. So, write a program in C or whatever and compile it. Compiling bash is a lame trick that doesn't solve any problem of those that are inherent to bash. |
|
thank a lot.
it will help me a lot to make my scripts secure. |
the other thing you can do is wrap the programs you call in the script in system() calls in c. but a crafty script-kiddie could use strings to grep thru your binary and get an idea of what you're doing.
|
All times are GMT -5. The time now is 02:23 PM. |