Hide your source code and prevent future modifications to your shell scripts in

Publicado el: 03 abril 2023
en el canal de: The Lazy SysAdmin
4,941
296

In this video, we'll be discussing the process of turning a shell script, which is a text-based program, into a standalone executable binary file that can be easily run on any system. This is a valuable skill for those who want to distribute their shell scripts or improve the performance and security of their programs. So, let's get started!"

If you've written a shell script and want to hide the source code and prevent future modifications, the shell script compiler or shc command might be your best bet.

Here's an example of using shc to compile a shell script:

To keep things simple, let's write a shell script that prints the phrase "Hello Lazy".

#!/bin/sh
echo "Hello Lazy"

Compile the script using shc:

shc -v -f hello.sh

This will create two extra files.

hello.sh is the original unconverted shell script
hello.sh.x is the converted shell script in binary format
and hello.sh.x.c is the C source code of the hello.sh file. This C source code is compiled to create the above converted hello.sh.x file.

Now, let us execute the converted shell script. You can run the binary file without the need for a shell interpreter:

./hello.sh.x

"shc" is a shell script compiler for Linux. It converts a shell script into a standalone binary executable. This can be useful for distributing scripts or making them more secure by hiding their source code.

PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)

GIVE SUPPORT -   / lazysysad  
BUY ME A COFFEE - https://www.buymeacoffee.com/lazysysad
PAYPAL - https://www.paypal.com/donate/?hosted...

Drop me your feedback and comments.

That's all for now.

If this video helped you in any way, please like share and subscribe!

Thank you!!!


En esta página del sitio puede ver el video en línea Hide your source code and prevent future modifications to your shell scripts in de Duración hora minuto segunda en buena calidad , que subió el usuario The Lazy SysAdmin 03 abril 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 4,941 veces y le gustó 296 a los espectadores. Disfruta viendo!