@
jdz #24
```
#!/bin/bash
set -e
#download v6.3.1136 for Linux 64bit from offical website, and then execute this script.
EXEFILE=$1
[ ! -x "$EXEFILE" ] && {
echo "usage: $0 /path/to/the/main/program/excutable/file"
exit 1
}
function sed_script(){
cat <<- EOF | base64 -d | gzip -c -d
H4sIAAAAAAAAA62VuW4bMRCG+zzFNO4CivdhIMV2Tm07QODYwZ6RgHgVRCqct88Mj5W0keQIEEFQ
JAV+/Ocfkqu9MoK3wLmzvDH8FrQAY0EJGGzsm9hq6hgFpgHTxZk2th1A9UWw6rF6eLx/eq6+Vc8f
NDFFYdrM7KFVEPhB7T3UyAxQd8AFaA++gaZB5gvL5Stjd4wR02qbmEJ1yBxa0oM6uyYuFNDj3544
nFOlyQ6sgc5D4wHYvSAUlTvWF6YrzB6Z01qsGOl+mCkEagcapliAYE8UdPVSfX9GptTKOEtCpZF1
NNQFUB1IA0oR1/l5lf3BEP58ulHsLZb4k6GuQMnR2XqrwA5guyhcg/VgAzgFkgNqwT5EWrt+ZQ/L
1QZ+rhCqpeQ6QrXqGoRaARZZOi5LxDgkVmzTjItxYAfqEZ1Yj91qu1qPGzZmqCnQlqCJkloVpQnC
UYawI8tk2sMArMf12C7rLat+t8vVtkeo8UqoCPWy9ZSoYz6eMpQ8zX4WS98yVBdo2Pd0Zii25EyR
SXEYkEP0NFr6WqPQsV8QNASTsu+DUgTFJLRkqA7ZAaSfkQ+bj/B5bNkkGKFW6Rx+sI0mTz2ZRZXT
BqomOVhPQpfb7a/N7WJxCJUTtL8WVDuTPA3NIGbn9Ex+dtCDLE1QywvUXUupsSolKgxWzaDvEgt0
j1mgrkD1mfCn4zXbYwofj9UiQx0XLt2oRoh5os4rTUbPlLICtQU6/KdSesNE3uxA6Y1YJKiRGSpd
l6Bncv2vD7DLe3IAoUFwTx8TaXm6+xdd/D2l06HKUFmgu7t/NDOnoFOOdlARP6UE7enlt+7C8H8c
C18IU6D10fDP7wGzC8Uy1BdodzVPhQgF2l/qKT6Jc0+zUl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