diff --git a/.github/ssc/ssc b/.github/ssc/ssc new file mode 100644 index 0000000..25ed0dc --- /dev/null +++ b/.github/ssc/ssc @@ -0,0 +1,102 @@ +#!/bin/sh + +while [ -n "$1" ]; do + case "$1" in + -4|--rc4) USE_RC4=1;; + -u|--untraceable) CXXFLAGS="$CXXFLAGS -DUNTRACEABLE";; + -s|--static) 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 -larchive -lacl -lz"; shift;; + -0|--fix-argv0) CXXFLAGS="$CXXFLAGS -DFIX_ARGV0";; + -v|--verbose) set -x; CXXFLAGS="$CXXFLAGS -v";; + -h|--help) SHOW_USAGE=1;; + -*|--*) echo "Unknown option $1"; exit 1;; + *) POSITIONAL_ARGS="$POSITIONAL_ARGS \"$1\"";; + esac + shift +done +eval set -- $POSITIONAL_ARGS +if [ -n "$SHOW_USAGE" -o $# != 2 ]; then + echo "Usage: $0 [-4] [-u] [-s] [-r] [-e|-E file] [-0]