-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path_run.sh
executable file
·35 lines (32 loc) · 903 Bytes
/
_run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
set -e
while getopts "a" OPTION 2> /dev/null; do
case ${OPTION} in
a)
DO_ATTACH="yes"
;;
\?)
break
;;
esac
done
if [ "$DO_ATTACH" == "yes" ]; then
set -m
sudo sysctl kernel.yama.ptrace_scope=0
./DemoApplication/dist/DemoApplication &
npm start -- inject \
DemoApplication \
Bootstrapper/build/libBootstrapper.so \
RuntimePatcher/dist/RuntimePatcher.runtimeconfig.json \
RuntimePatcher/dist/RuntimePatcher.dll \
"RuntimePatcher.Main, RuntimePatcher" \
"InitializePatches"
fg %1
else
LD_PRELOAD=./Bootstrapper/build/libBootstrapper.so \
RUNTIME_CONFIG_PATH="$(pwd)/RuntimePatcher/dist/RuntimePatcher.runtimeconfig.json" \
ASSEMBLY_PATH="$(pwd)/RuntimePatcher/dist/RuntimePatcher.dll" \
TYPE_NAME="RuntimePatcher.Main, RuntimePatcher" \
METHOD_NAME="InitializePatches" \
./DemoApplication/dist/DemoApplication
fi