Skip to content

Commit

Permalink
3.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
neurobin committed Jul 30, 2016
1 parent ac8e83b commit e2b6034
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 57 deletions.
12 changes: 9 additions & 3 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
CHANGES

3.9.3 Sat Jul 30 18:46:34 BDT 2016

* zsh support
* Fix issue #13 (https://github.com/neurobin/shc/issues/13)


3.9.2 Fri Aug 21 16:12:33 BDT 2015

Added BusyBox support with patch taken from:
Expand All @@ -15,9 +21,9 @@ CHANGES

3.9.0 Wed Apr 01 08:35:22 AM GMT 2015

Thanks to me http://github.com/neurobin,
for adding output file option with [-o filename]
and fixing bug on make install (manual install failed)
(http://github.com/neurobin)
Added output file option with [-o filename]
and fixed bug on make install (manual install failed)
Now you can access manual by entering command: man shc
in a terminal.

Expand Down
55 changes: 1 addition & 54 deletions README
Original file line number Diff line number Diff line change
@@ -1,54 +1 @@
# Shell Script Compiler

A generic shell script compiler. Shc takes a script, which is
specified on the command line and produces C source code. The
generated source code is then compiled and linked to produce a
stripped binary executable.

The compiled binary will still be dependent on the shell specified in the
first line of the shell code (i.e shebang) (i.e. #!/bin/sh), thus shc does not create com‐
pletely independent binaries.

shc itself is not a compiler such as cc, it rather encodes and encrypts a
shell script and generates C source code with the added expiration capability.
It then uses the system compiler to compile a stripped binary which behaves
exactly like the original script. Upon execution, the compiled binary will
decrypt and execute the code with the shell -c option.

Install:
--------

1. cd to directory "main": `cd main`
2. do a `make`
3. and then `sudo make install`
4. or simply run the `install` script/file provided, in terminal.

Usage:
------
```
shc [options]
shc -f script.sh -o binary
```



Testing:
--------

1. cd to `test` directory: `cd test`
2. Try: `shc -f test.bash -o test`
3. output binary file will be test. If no output file is specified
by the `-o` option, then it will create an executable with `.x` extension by default.


Known bugs:
-----------

The one (and I hope the only) limitation using shc is the
_SC_ARG_MAX system configuration parameter.

It limits the maximum length of the arguments to the exec function,
limiting the maximum length of the runnable script of shc.

!! - CHECK YOUR RESULTS CAREFULLY BEFORE USING - !!
<h2><a href="http://neurobin.github.io/shc">WebPage</a></h2>
README.md
Binary file modified bin/x32/shc
Binary file not shown.
Binary file modified bin/x64/shc
Binary file not shown.

0 comments on commit e2b6034

Please sign in to comment.