How to compile .sh script using g++?


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums Programming How to compile .sh script using g++?
# 1  
How to compile .sh script using g++?

Hi guys,

Can you please help with compiling 123.sh file using g++?

The idea is to make 123.sh not readable (make it kind of binary).
Is there any idea ho to achieve this?
# 2  
It's a bash script. Shell scripts do not need compilation.
What do you want to do? Be able to run the script from
your program?
# 3  
Quote:
Originally Posted by nypreH
Hi guys,

Can you please help with compiling 123.sh file using g++?
Shell scripts do not work that way.
Quote:
The idea is to make 123.sh not readable (make it kind of binary).
Is there any idea ho to achieve this?
Shell scripts do not work this way. There used to be a tool to do this, but it's become well known that all it does is feed the decrypted program into the shell as plaintext -- as it has to, for it to work at all!

Programs do not work that way.
# 4  
Quote:
Originally Posted by nypreH
Can you please help with compiling 123.sh file using g++
That's a two step process:
step 1: reimplement your script in C++
step 2: compile it with g++

Step 1 might be quite complex depending on both the script itself and your C++ skills.

In any case, whatever the kind of executable, nothing will prevent a determined user to reverse engineer it.

Last edited by jlliagre; 10-21-2014 at 01:50 PM..
# 5  
Quote:
Originally Posted by nypreH
Hi guys,

Can you please help with compiling 123.sh file using g++?

The idea is to make 123.sh not readable (make it kind of binary).
Is there any idea ho to achieve this?
What makes you think you can send code of any kind to someone else's computer in such a way they can't see how your code works?
This User Gave Thanks to achenle For This Post:
# 6  
Or, to turn that around:

Would you want people to be able to do that to you? Run completely anonymous code which can't be tracked, analyzed, controlled, accounted, reviewed, or trusted in any way? It's their computer. If you need to control access so completely that chmod isn't good enough for you, make them use yours, and don't give them the keys.

Last edited by Corona688; 10-21-2014 at 06:40 PM..
This User Gave Thanks to Corona688 For This Post:
# 7  
IF you want to maintain code provided as a vendor, and keep the customer from copying it, you can use shc. It has issues but is meant to do what Visual Basic did back in the '90's - keep compiled code safe from piracy - reverse engineering.

Francisco Rosales, home page
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #185
Difficulty: Medium
Moderating questions and answers at UNIX.com requires superior UNIX shell scripting abilities.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to compile or debug line by line in shell script?

I know about bash -x, set -x and -v but disappears from Command Line Interface in fraction of second ...... I am looking for a command or script ..complies each line and shows the output after executing each line ....( similar what we have in C ) Thanks in Advance (2 Replies)
Discussion started by: frintocf
2 Replies

2. Shell Programming and Scripting

bash script to compile multiple .c files with some options

I'm trying to write a bash script and call it "compile" such that running it allows me to compile multiple files with the options "-help," "-backup," and "-clean". I've got the code for the options written, i just can't figure out how to read the input string and then translate that into option... (5 Replies)
Discussion started by: travis.batzer
5 Replies

3. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

4. UNIX for Dummies Questions & Answers

Unable to compile Shell Script

Hi there, I have written the shell script to illustrate arithmetic operations using case command as shown below: #!/bin/bash echo -n "Enter any two numbers :" read a read b MENU=" Select any one option 1) Addition 2) Substraction 3) Multiplication 4) Division 5) Quit" clear $x=0;... (5 Replies)
Discussion started by: grc
5 Replies

5. Shell Programming and Scripting

Help - Bug: A script to compile two types of data files into two temporary files

Dear other forum members, I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong. Please help me. I just started to learn about bash scripting, and I appreciate if anyone of you can point out my errors. I thank you in advance. ... (3 Replies)
Discussion started by: ilove2smoke
3 Replies

6. Shell Programming and Scripting

compile a shell script

How can i compile a KSH shell script. I Dont want to execute it. I just need to compile it . Any Help sincerly appreciated. (5 Replies)
Discussion started by: panyam
5 Replies

7. Shell Programming and Scripting

How to compile a stored procedure that is there with in a script file(.sql) in unix

Hi, How can i compile the procedure code that is there in a script file (.sql) in unix. (0 Replies)
Discussion started by: krishna_gnv
0 Replies

8. Solaris

Help to compile

Hi everybody, I have a small opensource project http://hpaftpd.sourceforge.net (single-threaded ftp-server for heavy network traffic). It tested with FreeBSD and Linux. Can anybody try it with another Unix system? I'm interesting about HP/UX and Solaris. Thanks. (1 Reply)
Discussion started by: wwwdev
1 Replies

9. Programming

help to compile

Hello everybody, I have a small opensource project http://hpaftpd.sourceforge.net (single-threaded ftp-server). It tested with FreeBSD and Linux. Can anybody try it with another UNIX system ? I'm interesting about HP/UX and Solaris. I would very much appreciate receiving any results about it. ... (2 Replies)
Discussion started by: wwwdev
2 Replies

10. Programming

How to Compile programs using cc??

How do you Compile programs using cc?? I'm lost. Do I need to buy C or what? I'm only going to use it very few times a year. From what everyone seems to be telling me, it sounds like it is build into the Unix system but I'm having no luck. Please help or just point me in the right direction. ... (7 Replies)
Discussion started by: spotanddot
7 Replies

Featured Tech Videos