Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
liberize committed Dec 7, 2024
1 parent f2b5142 commit 1ae0f52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ Upon execution, the binary will call real script interpreter (systemwide, bundle
More options

```
Usage: ./ssc [-u] [-s] [-r] [-e|-E|-M file] [-0] [-d date] [-m msg] [-S N] <script> <binary>
Usage: ./ssc [-u] [-s] [-r] [-e|-E|-M file] [-0] [-n name] [-d date] [-m msg] [-S N] [-c] <script> <binary>
-u, --untraceable make untraceable binary
enable debugger detection, abort program when debugger is found
-s, --static make static binary
Expand Down
13 changes: 9 additions & 4 deletions ssc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ while [ -n "$1" ]; do
-s|--static) STATIC=1; CXXFLAGS="$CXXFLAGS -static -static-libgcc -static-libstdc++";;
-r|--random-key) RAND_KEY=1; CXXFLAGS="$CXXFLAGS -DOBFUSCATE_KEY=$(perl -e 'print int(rand(127))+1')";;
-i|--interpreter) CXXFLAGS="$CXXFLAGS -DINTERPRETER=$2"; shift;;
-e|--embed-interpreter) EMBED_FILE="$2"; CXXFLAGS="$CXXFLAGS -DEMBED_INTERPRETER_NAME=$2"; shift;;
-E|--embed-archive) EMBED_FILE="$2"; CXXFLAGS="$CXXFLAGS -DEMBED_ARCHIVE"; LDFLAGS="$LDFLAGS -lz"; shift;;
-M|--mount-squashfs) SQUASHFS_DATA="$2"; CXXFLAGS="$CXXFLAGS -DMOUNT_SQUASHFS -pthread"; LDFLAGS="$LDFLAGS squashfuse/.libs/*.a -lz -ldl"; PTHREAD=1; shift;;
-e|--embed-interpreter) EM="_$EM"; EMBED_FILE="$2"; CXXFLAGS="$CXXFLAGS -DEMBED_INTERPRETER_NAME=$2"; shift;;
-E|--embed-archive) EM="_$EM"; EMBED_FILE="$2"; CXXFLAGS="$CXXFLAGS -DEMBED_ARCHIVE"; LDFLAGS="$LDFLAGS -lz"; shift;;
-M|--mount-squashfs) EM="_$EM"; SQUASHFS_DATA="$2"; CXXFLAGS="$CXXFLAGS -DMOUNT_SQUASHFS -pthread"; LDFLAGS="$LDFLAGS squashfuse/.libs/*.a -lz -ldl"; PTHREAD=1; shift;;
-0|--fix-argv0) CXXFLAGS="$CXXFLAGS -DFIX_ARGV0";;
-n|--ps-name) CXXFLAGS="$CXXFLAGS -DPS_NAME=$2"; shift;;
-d|--expire-date) CXXFLAGS="$CXXFLAGS -DEXPIRE_DATE=$2"; shift;;
Expand All @@ -23,9 +23,14 @@ while [ -n "$1" ]; do
esac
shift
done
if [ "${#EM}" -gt 1 ]; then
echo "The -e, -E, -M flags can only be specified one at a time!"
exit 1
fi
eval set -- $POSITIONAL_ARGS
if [ -n "$SHOW_USAGE" -o $# != 2 ]; then
echo "Usage: $0 [-u] [-s] [-r] [-e|-E|-M file] [-0] [-d date] [-m msg] [-S N] <script> <binary>"
echo "Usage: $0 [-u] [-s] [-r] [-e|-E|-M file] [-0] [-n name] [-d date] [-m msg] [-S N] [-c] <script> <binary>"
echo ""
echo " -u, --untraceable make untraceable binary"
echo " enable debugger detection, abort program when debugger is found"
echo " -s, --static make static binary"
Expand Down

0 comments on commit 1ae0f52

Please sign in to comment.