executing a binary file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting executing a binary file
# 1  
Old 08-12-2006
executing a binary file

i have a large script file i need to encrypt. reason being i dont want anyone to be able to see whats inside.

i encrypted the file using the crypt commmand but when i go to run the file, it says that it can not execute binary files.

is there any other way to distort the contents of a script file and still be able to run it.

kinda like a command. say for instance who. if you do a more on the command who. you will see that it is encrypted. how can i do that to my script and still be able to run it?

thanks
Terrible
# 2  
Old 08-12-2006
Have you considered modifying file permissions? Superuser would still be able to access the script of course.

I'm pretty sure 'who' was written in C. You could re-write the script in C.

Note: 'who' is not encrypted. It is an executable program, compiled from C source code.

Last edited by nathan; 08-12-2006 at 08:55 PM..
# 3  
Old 08-12-2006
There are a number of shell obfuscators around, you could try searching for one of those and try that way, in all probability that would be sufficient.
# 4  
Old 08-12-2006
Out of curiosity, why you don't want anyone to see the script?
# 5  
Old 08-13-2006
the thing is i really hate anything that isn't shell programming. i'm sure there are ways to make both c and perl reduce the amount of work required to write shell scripts, but the thing is, i hate change. i love shell and i've been using it for eternity to do all that i need done and i think i'll continue.


i dont want anyone looking at the file for personal reasons. its a script i dont want anyone prying in on
Terrible
# 6  
Old 08-15-2006
Quote:
Originally Posted by Terrible
the thing is i really hate anything that isn't shell programming. i'm sure there are ways to make both c and perl reduce the amount of work required to write shell scripts, but the thing is, i hate change. i love shell and i've been using it for eternity to do all that i need done and i think i'll continue.


i dont want anyone looking at the file for personal reasons. its a script i dont want anyone prying in on

Fair enough. I just find it a curiosity that you'd ask people here for advice on scripts, but you don't want others to look at them.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Broken Pipe: executing a binary application

I got a issue with one binary application when i run it it will not run and after doing a truss i noticed the following errors in the log dose anyone know what the errors are about and how to fix them?, I also inserted a image of the error log in case their is something i have mists, thank you for... (19 Replies)
Discussion started by: Wpgn
19 Replies

2. Shell Programming and Scripting

Binary Operator expected while executing the below shell script.

Hi Experts, Iam bit poor in shell scripting, Here my requirement is for generating an alert where the oracle database db_recovery_file_dest_size usage. If it reaches beyond 80% should recieve an alert through an email. Want to schedule this alert in cron. #!/bin/bash .... (9 Replies)
Discussion started by: Jagadish m
9 Replies

3. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

4. UNIX for Dummies Questions & Answers

[AIX] Binary file warning for text file.

Hello guys, We had to move from a DC to another, and we are now facing an "issue" with some text files. Looks like that some of our log files are set as binary: file TuxConnectorURA.20121012 TuxConnectorURA.20121012: data or International Language text less TuxConnectorURA.20121012... (2 Replies)
Discussion started by: EnioMarques
2 Replies

5. Shell Programming and Scripting

Output redirection of c binary file to a file in shell script is failing

I am struck up with a problem and that is with output redirection. I used all the ways for the redirection of the output of c binary to a file, still it is failing. Here are the different ways which I have used: ./a.out | tee -a /root/tmp.txt 2>&1 ./a.out | tee -a /root/tmp.txt 1>&1 ./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies

6. UNIX for Advanced & Expert Users

How to copy a binary file while the file is being written to by another process

Hello, Can I copy a binary file while the file is being written to by another process? Another process (program) “P1” creates and opens (for writing) binary file “ABC” on local disk. Process P1 continuously write into ABC file every couple of seconds, adding 512-byte blocks of data. ABC file... (1 Reply)
Discussion started by: mbuki
1 Replies

7. UNIX for Dummies Questions & Answers

Pipe binary file matches grep results to file

I am using grep to match a pattern, but the output is strange. $ grep -r -o "pattern" * Gives me: Binary file foo1 matches Binary file foo2 matches Binary file foo3 matches To find the lines before/after, I then have to use the following on each file: $ strings foo1 | grep -A1 -B1... (0 Replies)
Discussion started by: chipperuga
0 Replies

8. Shell Programming and Scripting

To log binary file output to a txt file

Hi, I wrote a small script whose function is to execute the postemsg provided if the threshold breaches. I want to log this postemsg messages to a log file. But I am not able to do. Can someone throw some light on how to log the output of this. I am pasting a snippet of that code. ... (2 Replies)
Discussion started by: dbashyam
2 Replies

9. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

10. Shell Programming and Scripting

Reading file names from a file and executing the relative file from shell script

Hi How can i dynamically read files names from a list file and execute them from a single shell script. Please help its urgent Thanks in Advance (4 Replies)
Discussion started by: anushilrai
4 Replies
Login or Register to Ask a Question