2020-03-14 20:31:20 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-10-10 19:31:31 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright (C) 2020 CismonX <admin@cismon.net>
|
|
|
|
#
|
|
|
|
# Copying and distribution of this file, with or without modification, are
|
|
|
|
# permitted in any medium without royalty, provided the copyright notice and
|
|
|
|
# this notice are preserved. This file is offered as-is, without any warranty.
|
|
|
|
#
|
2020-03-14 20:31:20 +00:00
|
|
|
|
2020-06-22 05:57:09 +00:00
|
|
|
CMD=`[[ "$5" == "/"* ]] && echo 'cat' || echo 'echo'`
|
|
|
|
U6A_BYTECODE=`$CMD $5 | $1 - | base64 $3`
|
2020-03-14 21:08:01 +00:00
|
|
|
test -z $U6A_BYTECODE && exit -1
|
2020-03-15 08:21:18 +00:00
|
|
|
cat <(echo $U6A_BYTECODE | base64 $4) <(test $6 && cat $6) | $2 -
|
2020-03-14 20:31:20 +00:00
|
|
|
|
2020-03-15 08:21:18 +00:00
|
|
|
# Usage: ./u6a_run u6ac_bin u6a_bin b64_encode_ops b64_decode_ops src_code [input_file]
|