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

Опубликовано: 03 Апрель 2023
на канале: 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!!!


Смотрите видео Hide your source code and prevent future modifications to your shell scripts in онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The Lazy SysAdmin 03 Апрель 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,941 раз и оно понравилось 296 людям.