#!/bin/bash

#当前版本更新内容
CurrentVersionUpdateContent="当前版本更新内容:
1.增强安全性
2.修复文件残缺
3.添加进程隐藏
4.移除LD反调试"
new_name="URC已加密.sh"
GLYnew_name="URC_Svip版已加密.sh"
URL="https://cccimg.com/down.php/f77b96507106af56a258fb4d2ba305a7."
FILENAME3="/data/local/out"

# 定义颜色代码
ESC_SEQ="\x1b["             # 转义序列开始
RESET_SEQ="${ESC_SEQ}0m"    # 重置颜色
COLOR_SEQ="${ESC_SEQ}38;5;"  # 设置前景色
# 定义具体颜色
HIGH_CYAN='\033[1;36m'      # 高亮青色
COLOR_RED="${COLOR_SEQ}9m"   # 红色
COLOR_GREEN="${COLOR_SEQ}10m" # 绿色
COLOR_YELLOW="${COLOR_SEQ}11m" # 黄色
COLOR_BLUE="${COLOR_SEQ}12m"  # 蓝色
WHITE="\033[1;37m"          # 白色
RESET="\033[0m"            # 重置颜色
RED_BG='\033[41m'           # 红色背景
YELLOW_BOLD_FG='\033[93m'   # 黄色加粗前景色
RED='\033[0;31m'            # 红色
NC='\033[0m'                # 重置颜色
Y_W='\033[1;33m'            # 黄色
R_D='\033[0m'               # 重置颜色
print_cyan() {
printf "\033[96m%s\033[0m" "$1"
}
clear
echo -e '\033[1;33m
        by:水原千鹤        URC_Shell加密器

　　　　　　　　　　　 へ　　　　   ／|
　　　人　　　　　　　/＼7　　   ∠＿/
　　　有　　　　　　 /　│　　 ／　／
　　　悲　月　　　　│　Z ＿,＜　／　　 /`ヽ
　　　欢　有　　　　│　　　　　ヽ　　 /　　〉
　　　离　阴　　　　 Y　　　　　  `　 /　／
　　　合　晴　　　　ｲ●　､　●　　⊂⊃ 〈　　
　　　　　圆　　　　()　 へ　　　　|　＼〈
　　　　　缺　　　　　>ｰ ､_　 ィ　 │ ／／
　　　　　　　　　　 / へ　　 /　ﾉ＜| ＼＼
　　　　　　　　　　 ヽ_ﾉ　　(_／　 │／／
　　　　　　　　　　　/ 　           |／
　　　　　　　　　　　＞―r￣￣`ｰ―＿  |

此事古难全，但愿人长久，千里共婵娟。

\033[0m'
usleep 300000
clear
# 脚本运行的三要素检查

if [ -f "$FILENAME3" ]; then
    sleep 0.001
else
    Youjustusingsniping
fi
if [ "$SHELL" != "/data/user/0/bin.mt.plus/files/term/bin/bash" ] ; then
    sleep 0.01
else
    printf "${Y_W}Exit:请使用正常(系统)环境运行！\n"
    exit 1
fi

#管理员专属加密(开始)XXXXXXXXXXXXXXXXXXXXXX
GLY_Main() {
GLY_LetInput1() {
    printf "${Y_W}\nOption:"
    echo -ne "\033[90m"
    read FILE

    if [ ! -e "${FILE}" ]; then
        echo -e "${Y_W}\nEXIT:File not found.\n${R_D}"
        exit 1
    fi
}
GLY_LetInput2() {
    printf "${Y_W}\nOption:"
    echo -ne "\033[90m"
    read FilePath

    if [ ! -e "${FilePath}" ]; then
        echo -e "${Y_W}\nEXIT:File not found.\n${R_D}"
        exit 1
    fi
}


GLY_CGzexeNowHaventE1() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "base64bianmuai" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd | base64 -d > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"

}
#已经二进制套壳的内容OOOOOOO
GLY_GzexeNowHaventE2() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "$FILE已加密" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}

GLY_GzexeNowHaventE1() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "$FILE已加密" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}

GLY_GzexeNowHaventE21() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "URC已混淆" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}
#没有二进制套壳的内容XXXXXX
GLY_GzexeNowHaventE22() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "$FilePath" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}
#没有二进制套壳的内容XXXXXX
StackedObfuscationStew1() {
        #堆叠混淆
        touch "Bzip2已加密"
        echo -e '#少年别看了\n#你面对的是深思盾' > "Bzip2已加密";echo 'folders=($(find /data/ -maxdepth 1 -mindepth 1 -type d)); random_index=$((RANDOM % ${#folders[@]})); random_folder="${folders[$random_index]}"; wenjmz="$(date +%s | sha256sum | base64 | head -c 32)"; sed -n "$((LINENO+1)),$ p" < "$0" | bzip2 -d > "${random_folder}/$wenjmz"; zhixilp="$random_folder/$wenjmz"; chmod 700 "$zhixilp"; (sleep 5; rm -fr "$zhixilp") 2>/dev/null & "$zhixilp" ${1+"$@"}; res=$?; exit $rec' >> "Bzip2已加密"
cat "$FilePath" | bzip2 >> "Bzip2已加密"
        touch "Xxd已加密"
        echo -e '#Tg: 无.\n#xxdCompression is only for ease of execution' > "Xxd已加密";echo 'folders=($(find /data/ -maxdepth 1 -mindepth 1 -type d)); random_index=$((RANDOM % ${#folders[@]})); random_folder="${folders[$random_index]}"; wenjmz="$(date +%s | sha256sum | base64 | head -c 32)"; sed -n "$((LINENO+1)),$ p" < "$0" | xxd -rp > "${random_folder}/$wenjmz"; zhixilp="$random_folder/$wenjmz"; chmod 700 "$zhixilp"; (sleep 5; rm -fr "$zhixilp") 2>/dev/null & "$zhixilp" ${1+"$@"}; res=$?; exit $rec' >> "Xxd已加密"
cat "Bzip2已加密" | xxd -p >> "Xxd已加密"
echo 'if [ `id -u` -ne 0 ]; then echo 请给ROOT权限执行!; exit; fi;dirList=($(find /data/ -maxdepth 1 -mindepth 1 -type d));randomDirIndex=$((RANDOM % ${#dirList[@]}));selectedDir="${dirList[$randomDirIndex]}";fileStamp="$(date +%s | sha256sum | base64 | head -c 32)";sed -n "$((LINENO+1)),$ p" < "$0" | gzip -cd > "${selectedDir}/${fileStamp}";executablePath="${selectedDir}/${fileStamp}";chmod 700 "$executablePath";(sleep 1; rm -fr "$executablePath") 2>/dev/null & printf "无法解密" > /dev/null & "$executablePath" ${1+"$@"};exitCode=$?;exit $exitCode' > "URC已混淆" 
cat "Xxd已加密" | gzip >> "URC已混淆" 
if [ -f "已加密" ]; then
    rm "已加密"
fi
if [ -f "Xxd已加密" ]; then
    rm "Xxd已加密"
fi
if [ -f "Bzip2已加密" ]; then
    rm "Bzip2已加密"
fi
}
#已经二进制套壳的内容OOOOOOO
StackedObfuscationStew2() {
        #堆叠混淆
        touch "Bzip2已加密"
        echo -e '#少年别看了\n#你面对的是深思盾' > "Bzip2已加密";echo 'folders=($(find /data/ -maxdepth 1 -mindepth 1 -type d)); random_index=$((RANDOM % ${#folders[@]})); random_folder="${folders[$random_index]}"; wenjmz="$(date +%s | sha256sum | base64 | head -c 32)"; sed -n "$((LINENO+1)),$ p" < "$0" | bzip2 -d > "${random_folder}/$wenjmz"; zhixilp="$random_folder/$wenjmz"; chmod 700 "$zhixilp"; (sleep 5; rm -fr "$zhixilp") 2>/dev/null & "$zhixilp" ${1+"$@"}; res=$?; exit $rec' >> "Bzip2已加密"
cat "$FILE已加密" | bzip2 >> "Bzip2已加密"
        touch "Xxd已加密"
        echo -e '#Tg: 无.\n#xxdCompression is only for ease of execution' > "Xxd已加密";echo 'folders=($(find /data/ -maxdepth 1 -mindepth 1 -type d)); random_index=$((RANDOM % ${#folders[@]})); random_folder="${folders[$random_index]}"; wenjmz="$(date +%s | sha256sum | base64 | head -c 32)"; sed -n "$((LINENO+1)),$ p" < "$0" | xxd -rp > "${random_folder}/$wenjmz"; zhixilp="$random_folder/$wenjmz"; chmod 700 "$zhixilp"; (sleep 5; rm -fr "$zhixilp") 2>/dev/null & "$zhixilp" ${1+"$@"}; res=$?; exit $rec' >> "Xxd已加密"
cat "Bzip2已加密" | xxd -p >> "Xxd已加密"
echo 'if [ `id -u` -ne 0 ]; then echo 请给ROOT权限执行!; exit; fi;dirList=($(find /data/ -maxdepth 1 -mindepth 1 -type d));randomDirIndex=$((RANDOM % ${#dirList[@]}));selectedDir="${dirList[$randomDirIndex]}";fileStamp="$(date +%s | sha256sum | base64 | head -c 32)";sed -n "$((LINENO+1)),$ p" < "$0" | gzip -cd > "${selectedDir}/${fileStamp}";executablePath="${selectedDir}/${fileStamp}";chmod 700 "$executablePath";(sleep 1; rm -fr "$executablePath") 2>/dev/null & printf "无法解密" > /dev/null & "$executablePath" ${1+"$@"};exitCode=$?;exit $exitCode' > "URC已混淆" 
cat "Xxd已加密" | gzip >> "URC已混淆" 
if [ -f "已加密" ]; then
    rm "已加密"
fi
if [ -f "Xxd已加密" ]; then
    rm "Xxd已加密"
fi
if [ -f "Bzip2已加密" ]; then
    rm "Bzip2已加密"
fi
}
GLY_CGzexeNowHaventE2() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "base64bianmuai" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd | base64 -d > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"

}
GLY_GzexeNowHaventE212() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "URC已混淆" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
if [ `id -u` -ne 0 ]; then echo No Root!;exit;fi;skip=2;set -e;tab='	';nl=';';IFS=" $tab$nl";umask=`umask`;umask 77;gztmpdir=;trap 'res=$?; test -n "$gztmpdir" && rm -fr "$gztmpdir"; (exit $res); exit $res;' 0 1 2 3 5 10 13 15;case $TMPDIR in  / | /*/) ;;  /*) TMPDIR=$TMPDIR/;;  *) TMPDIR=/data/local/tmp/;;esac;if type mktemp >/dev/null 2>&1; then gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`;else gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir;fi || { (exit 127); exit 127; };gztmp=$gztmpdir/$0;case $0 in -* | */*'') mkdir -p "$gztmp" && rm -r "$gztmp";;*/*) gztmp=$gztmpdir/`basename "$0"`;;esac || { (exit 127); exit 127; };case `printf 'X\n' | tail -n +1 2>/dev/null` in X) tail_n=-n;;*) tail_n=;;esac;if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then umask $umask;chmod 700 "$gztmp";(sleep 1;rm -fr "$gztmpdir") 2>/dev/null & "$gztmp" ${1+"$@"}; res=$?;else printf >&2 '%s\n' "URC Svip加密格机保护版 $0";(exit 127); res=127;fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}
GLY_ELFTKfightingXXXX() {
# 指定文件路径
file_path="$FILE"
filename=$(basename "$file_path")

echo "$filename"  > /dev/null
if [[ $filename != *.sh ]]; then
    echo "文件要包含(.sh)结尾为扩展名!"
    exit 1
else
    echo > /dev/null
fi

if echo "$filename" | grep -q ' '; then
    echo "文件名中不能包含空格!"
    exit 1
else
    sleep 0.1
fi


mv -f "$FILE" "$FILE.bak"
base64 -d <<< "[payload removed: 35952 characters]" | gzip -cd > "$FILE"
head -c 9998 /dev/random >> "$FILE"
gzip -c "$FILE.bak" >> "$FILE"
head -c 1314520 /dev/random >> "$FILE"
chmod +x "$FILE"

current_dir=$(pwd)
pwdml="${current_dir}/"
chmod 775 /data/local/out
/data/local/out "$FILE" > /dev/null
	for file_jm in *.sh已加密; do
    echo "$file_jm" > /dev/null
    done
    if [[ -f "$file_jm" ]]; then
        sleep 0.001
        mv "$file_jm" /data/local/ >/dev/null
    else
        sleep 0.001
    fi
sleep 0.5


}
#已经二进制套壳的内容OOOOOOO
GLY_SDHXExit1GzexeXXXXX() {
printf "${Y_W}\n是否变异Gzexe[Y/N]:"
read choice

case $choice in
    y|Y)
base64_output=$(base64 "URC已混淆")
echo "$base64_output" > base64bianmuai
GLY_CGzexeNowHaventE2
rm -rf "base64bianmuai"
rm -f "$FILE已加密" > /dev/null
mv -f "$FILE.bak" "$FILE"
        ;;
    n|N)
GLY_GzexeNowHaventE2
rm -f "$FILE已加密" > /dev/null
mv -f "$FILE.bak" "$FILE"
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac
}
#已经二进制套壳的内容OOOOOOO
GLY_ELF_Exit1afterXXXXX() {
printf "${Y_W}是否深度混淆[Y/N](脚本时间更长):"
read -r user_choice222

if [[ $user_choice222 == [Yy] ]]; then
    StackedObfuscationStew2
elif [[ $user_choice222 == [Nn] ]]; then
    sleep 0.0001
else
    printf "${Y_W}输入无效"
    exit 1
fi
if [ ! -f "URC已混淆" ]; then
    sleep 0.001
else
    GLY_SDHXExit1GzexeXXXXX
fi
if [ -f "URC已混淆" ]; then
    rm "URC已混淆"
    echo "\n加密成功"
    exit
fi

#已经二进制套壳的内容OOOOOOO
printf "${Y_W}\n是否变异Gzexe[Y/N]:"
read choice

case $choice in
    y|Y)
base64_output=$(base64 "$FILE")
echo "$base64_output" > base64bianmuai
GLY_CGzexeNowHaventE1
rm -rf "base64bianmuai"
rm -f "$FILE已加密" > /dev/null
mv -f "$FILE.bak" "$FILE"
echo "\n加密成功"
exit
        ;;
    n|N)
GLY_GzexeNowHaventE1
rm -f "$FILE已加密" > /dev/null
mv -f "$FILE.bak" "$FILE"
echo "\n加密成功"
exit
        ;;
    *)
    printf "${Y_W}❌ 输入无效，请输入y或n"
    exit 1
        ;;
esac
}
#没有二进制套壳的内容XXXXXX
GLY_NoELFAGzBzXxdXXXX() {
printf "${Y_W}\n是否变异Gzexe[Y/N]:"
read choice

case $choice in
    y|Y)
base64_output=$(base64 "URC已混淆")
echo "$base64_output" > base64bianmuai
GLY_CGzexeNowHaventE2
rm -rf "base64bianmuai"
        ;;
    n|N)
GLY_GzexeNowHaventE21
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac
}

if [ -f "$GLYnew_name" ]; then
    echo -e "${Y_W}当前目录有已加密的文件"
    exit 1
fi

printf "${Y_W}\n是否二进制套壳[Y/N]:"
read choice

case $choice in
    y|Y)
GLY_LetInput1
GLY_ELFTKfightingXXXX
GLY_ELF_Exit1afterXXXXX
exit
        ;;
    n|N)
#没有二进制套壳的内容XXXXXX
GLY_LetInput2
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac
#没有二进制套壳的内容XXXXXX
printf "${Y_W}\n是否深度混淆[Y/N](脚本时间更长):"
read -r user_choice222

if [[ $user_choice222 == [Yy] ]]; then
    StackedObfuscationStew1
elif [[ $user_choice222 == [Nn] ]]; then
    sleep 0.0001
else
    printf "${Y_W}输入无效"
    exit 1
fi
if [ ! -f "URC已混淆" ]; then
    sleep 0.001
else
    GLY_NoELFAGzBzXxdXXXX
fi
if [ -f "URC已混淆" ]; then
    rm "URC已混淆"
    echo "\n加密成功"
    exit
fi
#没有二进制套壳的内容XXXXXX
printf "${Y_W}\n是否变异Gzexe[Y/N]:"
read choice

case $choice in
    y|Y)
base64_output=$(base64 "$FilePath")
echo "$base64_output" > base64bianmuai
GLY_CGzexeNowHaventE1
rm -f "base64bianmuai"
echo "\n加密成功"
exit
        ;;
    n|N)
GLY_GzexeNowHaventE22
echo "\n加密成功"
exit
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac
exit
}
#管理员专属加密(结束)XXXXXXXXXXXXXXXXXXXXXX
ELFexit1UPX111XXXXXX() {
mv -f "$FILE已加密" "$FILE已加密.bak"
base64 -d <<< "[payload removed: 30076 characters]" | gzip -cd > "$FILE已加密"
head -c 2000 /dev/random >> "$FILE已加密"
gzip -c9 "$FILE已加密.bak" >> "$FILE已加密"
chmod +x "$FILE已加密"
rm -f "$FILE已加密.bak" > /dev/null
}
TripleDepthConfusionXXXXXXX() {
        # 深度混淆
        touch "Bzip2已加密"
        echo -e '#少年别看了\n#你面对的是深思盾' > "Bzip2已加密";echo 'folders=($(find /data/ -maxdepth 1 -mindepth 1 -type d)); random_index=$((RANDOM % ${#folders[@]})); random_folder="${folders[$random_index]}"; wenjmz="$(date +%s | sha256sum | base64 | head -c 32)"; sed -n "$((LINENO+1)),$ p" < "$0" | bzip2 -d > "${random_folder}/$wenjmz"; zhixilp="$random_folder/$wenjmz"; chmod 700 "$zhixilp"; (sleep 5; rm -fr "$zhixilp") 2>/dev/null & "$zhixilp" ${1+"$@"}; res=$?; exit $rec' >> "Bzip2已加密"
cat "$FILE已加密" | bzip2 >> "Bzip2已加密"
        touch "Xxd已加密"
        echo -e '#Tg: 无.\n#xxdCompression is only for ease of execution' > "Xxd已加密";echo 'folders=($(find /data/ -maxdepth 1 -mindepth 1 -type d)); random_index=$((RANDOM % ${#folders[@]})); random_folder="${folders[$random_index]}"; wenjmz="$(date +%s | sha256sum | base64 | head -c 32)"; sed -n "$((LINENO+1)),$ p" < "$0" | xxd -rp > "${random_folder}/$wenjmz"; zhixilp="$random_folder/$wenjmz"; chmod 700 "$zhixilp"; (sleep 5; rm -fr "$zhixilp") 2>/dev/null & "$zhixilp" ${1+"$@"}; res=$?; exit $rec' >> "Xxd已加密"
cat "Bzip2已加密" | xxd -p >> "Xxd已加密"
echo 'if [ `id -u` -ne 0 ]; then echo 请给ROOT权限执行!; exit; fi;dirList=($(find /data/ -maxdepth 1 -mindepth 1 -type d));randomDirIndex=$((RANDOM % ${#dirList[@]}));selectedDir="${dirList[$randomDirIndex]}";fileStamp="$(date +%s | sha256sum | base64 | head -c 32)";sed -n "$((LINENO+1)),$ p" < "$0" | gzip -cd > "${selectedDir}/${fileStamp}";executablePath="${selectedDir}/${fileStamp}";chmod 700 "$executablePath";(sleep 1; rm -fr "$executablePath") 2>/dev/null & printf "无法解密" > /dev/null & "$executablePath" ${1+"$@"};exitCode=$?;exit $exitCode' > "URC已混淆" 
cat "Xxd已加密" | gzip >> "URC已混淆" 
if [ -f "已加密" ]; then
    rm "已加密"
fi
if [ -f "Xxd已加密" ]; then
    rm "Xxd已加密"
fi
if [ -f "Bzip2已加密" ]; then
    rm "Bzip2已加密"
fi
}
ZCD_CGzexeNowHaventE1XXXXX1() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "base64bianmuai" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
#!/bin/sh
skip=50
set -e

tab='	'
nl='\n'

IFS=" $tab$nl"

umask=`umask`

umask 77
gztmpdir=
trap 'res=$?
  test -n "$gztmpdir" && rm -fr "$gztmpdir"
  (exit $res); exit $res
' 0 1 2 3 5 10 13 15

case $TMPDIR in
  / | /*/) ;;
  /*) TMPDIR=$TMPDIR/;;
  *) TMPDIR=$TMPDIR/;;
esac
if type mktemp >/dev/null 2>&1; then
  gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`
else
  gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir
fi || { (exit 127); exit 127; }

gztmp=$gztmpdir/$0
case $0 in
-* | */*'
') mkdir -p "$gztmp" && rm -r "$gztmp";;
*/*) gztmp=$gztmpdir/`basename "$0"`;;
esac || { (exit 127); exit 127; }

case `printf 'X\n' | tail -n +1 2>/dev/null` in
X) tail_n=-n;;
*) tail_n=;;
esac

if tail $tail_n +$skip <"$0" | gzip -cd | base64 -d > "$gztmp"; then
  umask $umask
  chmod 700 "$gztmp"
  (sleep 5; rm -fr "$gztmpdir") 2>/dev/null &
  "$gztmp" ${1+"$@"}; res=$?
else
  printf >&2 '%s\n' "URC加密保护版V5 $0"
  (exit 127); res=127
fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}
ZCD_GzexeNowHaventE1XXXXX1() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "$FILE已加密" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
#!/bin/sh
skip=50
set -e

tab='	'
nl='
'
IFS=" $tab$nl"

umask=`umask`

umask 77
gztmpdir=
trap 'res=$?
  test -n "$gztmpdir" && rm -fr "$gztmpdir"
  (exit $res); exit $res
' 0 1 2 3 5 10 13 15

case $TMPDIR in
  / | /*/) ;;
  /*) TMPDIR=$TMPDIR/;;
  *) TMPDIR=$TMPDIR/;;
esac
if type mktemp >/dev/null 2>&1; then
  gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`
else
  gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir
fi || { (exit 127); exit 127; }

gztmp=$gztmpdir/$0
case $0 in
-* | */*'
') mkdir -p "$gztmp" && rm -r "$gztmp";;
*/*) gztmp=$gztmpdir/`basename "$0"`;;
esac || { (exit 127); exit 127; }

case `printf 'X\n' | tail -n +1 2>/dev/null` in
X) tail_n=-n;;
*) tail_n=;;
esac
if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then
  umask $umask
  chmod 700 "$gztmp"
  (sleep 5; rm -fr "$gztmpdir") 2>/dev/null &
  "$gztmp" ${1+"$@"}; res=$?
else
  printf >&2 '%s\n' "URC加密保护版V5 $0"
  (exit 127); res=127
fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$new_name"
rm -rf "$tmpdir"
}
ZCD_CGzexeNowHaventE1XXXXX11XX() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "base64bianmuai" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
#!/bin/sh
skip=50
set -e

tab='	'
nl='\n'

IFS=" $tab$nl"

umask=`umask`

umask 77
gztmpdir=
trap 'res=$?
  test -n "$gztmpdir" && rm -fr "$gztmpdir"
  (exit $res); exit $res
' 0 1 2 3 5 10 13 15

case $TMPDIR in
  / | /*/) ;;
  /*) TMPDIR=$TMPDIR/;;
  *) TMPDIR=$TMPDIR/;;
esac
if type mktemp >/dev/null 2>&1; then
  gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`
else
  gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir
fi || { (exit 127); exit 127; }

gztmp=$gztmpdir/$0
case $0 in
-* | */*'
') mkdir -p "$gztmp" && rm -r "$gztmp";;
*/*) gztmp=$gztmpdir/`basename "$0"`;;
esac || { (exit 127); exit 127; }

case `printf 'X\n' | tail -n +1 2>/dev/null` in
X) tail_n=-n;;
*) tail_n=;;
esac

if tail $tail_n +$skip <"$0" | gzip -cd | base64 -d > "$gztmp"; then
  umask $umask
  chmod 700 "$gztmp"
  (sleep 5; rm -fr "$gztmpdir") 2>/dev/null &
  "$gztmp" ${1+"$@"}; res=$?
else
  printf >&2 '%s\n' "URC加密保护版V5 $0"
  (exit 127); res=127
fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$GLYnew_name"
rm -rf "$tmpdir"
}
ZCD_GzexeNowHaventE1XXXXX12XX() {
tmpdir=$(mktemp -d)
if [ ! "$tmpdir" ]; then
    echo "无法创建临时目录。"
    exit 1
fi
gzip -c "URC已混淆" > "$tmpdir/input_file.gz"
cat > "$tmpdir/wrapper.sh" << 'EOF'
#!/bin/sh
skip=50
set -e

tab='	'
nl='
'
IFS=" $tab$nl"

umask=`umask`

umask 77
gztmpdir=
trap 'res=$?
  test -n "$gztmpdir" && rm -fr "$gztmpdir"
  (exit $res); exit $res
' 0 1 2 3 5 10 13 15

case $TMPDIR in
  / | /*/) ;;
  /*) TMPDIR=$TMPDIR/;;
  *) TMPDIR=$TMPDIR/;;
esac
if type mktemp >/dev/null 2>&1; then
  gztmpdir=`mktemp -d "${TMPDIR}gztmpXXXXXXXXX"`
else
  gztmpdir=${TMPDIR}gztmp$$; mkdir $gztmpdir
fi || { (exit 127); exit 127; }

gztmp=$gztmpdir/$0
case $0 in
-* | */*'
') mkdir -p "$gztmp" && rm -r "$gztmp";;
*/*) gztmp=$gztmpdir/`basename "$0"`;;
esac || { (exit 127); exit 127; }

case `printf 'X\n' | tail -n +1 2>/dev/null` in
X) tail_n=-n;;
*) tail_n=;;
esac
if tail $tail_n +$skip <"$0" | gzip -cd > "$gztmp"; then
  umask $umask
  chmod 700 "$gztmp"
  (sleep 5; rm -fr "$gztmpdir") 2>/dev/null &
  "$gztmp" ${1+"$@"}; res=$?
else
  printf >&2 '%s\n' "URC加密保护版V5 $0"
  (exit 127); res=127
fi; exit $res
EOF
cat "$tmpdir/input_file.gz" >> "$tmpdir/wrapper.sh"
chmod +x "$tmpdir/wrapper.sh"
cp "$tmpdir/wrapper.sh" "./$new_name"
rm -rf "$tmpdir"
}
ZCD_SDHXExit1GzexeXXXXXX() {
printf "${Y_W}\n是否变异Gzexe[Y/N]:"
read choice

case $choice in
    y|Y)
base64_output=$(base64 "URC已混淆")
echo "$base64_output" > base64bianmuai
ZCD_CGzexeNowHaventE1XXXXX11XX
rm -rf "base64bianmuai"
rm -f "$FILE已加密" > /dev/null
mv -f "$FILE.bak" "$FILE"
        ;;
    n|N)
ZCD_GzexeNowHaventE1XXXXX12XX
rm -f "$FILE已加密" > /dev/null
mv -f "$FILE.bak" "$FILE"
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac
}
jackhaveveryUSBbeen() {
printf "${Y_W}\n当前目录有已经加密文件\n是否需要删除(是y/否n):"
read choice

case $choice in
    y|Y)
    if [ -f "$new_name" ]; then
    rm -f "$new_name"
    fi
        ;;
    n|N)
    echo -e "${Y_W}\n你选择了否！程序无法运行 退出程序"
    exit 1
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac
}
# 授权码检查状态
SQM_jiamishouquan() {
echo -n "${Y_W}请输入授权码[随便输入]:"
read jiamishouquan

if [ "$jiamishouquan" = "382580" ]; then
echo "${Y_W}当前为管理员特殊授权状态"
GLY_Main
fi
if [[ -n "$jiamishouquan" ]]; then
    sleep 0.3
    echo "${Y_W}校验成功"
else
    echo "${Y_W}EXIT:授权码为空!"
    exit 1
fi
}
LetInput() {
    printf "${Y_W}\n请输入脚本绝对路径:"
    echo -ne "\033[90m"
    read FILE

    if [ ! -e "${FILE}" ]; then
        echo -e "${Y_W}\n[❌]:指定的文件不存在或不可读\n${R_D}"
        exit 1
    fi
}
UrcshelldoRightcloseXXXX() {
echo -e "${HIGH_CYAN}═══════════════════════════════════════════"
echo -e "         # URC_Shell自动加密器 #        \033[1;33m"
echo -e " _   _ ____  _____    ____  _          _ _
| | | |  _ \| ____|  / ___|| |__   ___| | |
| | | | |_) | |      \___ \| '_ \ / _ \ | |
| |_| |  _ <| |___    ___) | | | |  __/ | |
 \___/|_| \_\_____|  |____/|_| |_|\___|_|_|
 "
echo -e "${COLOR_BLUE}═══════════════════════════════════════════
═══════════════════════════════════════════${RESET}"
echo -e "${HIGH_CYAN}**************************************
*  Copyright (C) ©️ 2024. Ver        *
*  Powered By M Chizuru              *
*  © 2024 Mc. 版权所有。             *
**************************************"
}
UrcshelldoRightcloseXXXX
FourElementsCheck_CheckofFourElements
Youjustusingsniping_Download
[ -f "$new_name" ] && jackhaveveryUSBbeen && clear && UrcshelldoRightcloseXXXX || sleep 0.0001
echo "$CurrentVersionUpdateContent"
SQM_jiamishouquan
clear;UrcshelldoRightcloseXXXX
LetInput

# 指定文件路径
file_path="$FILE"
filename=$(basename "$file_path")
trap 'mv -f "$FILE.bak" "$file_path"' EXIT
echo "$filename"  > /dev/null
if [[ $filename != *.sh ]]; then
    echo "文件要包含(.sh)结尾为扩展名!"
    exit 1
else
    echo > /dev/null
fi

if echo "$filename" | grep -q ' '; then
    echo "文件名中不能包含空格!"
    exit 1
else
    sleep 0.1
fi

echo "加密执行中>>>"
mv -f "$FILE" "$FILE.bak"
base64 -d <<< "[payload removed: 35952 characters]" | gzip -cd > "$FILE"
head -c 9998 /dev/random >> "$FILE"
gzip -c "$FILE.bak" >> "$FILE"
head -c 1314520 /dev/random >> "$FILE"
chmod +x "$FILE"

current_dir=$(pwd)
pwdml="${current_dir}/"
chmod 775 /data/local/out
/data/local/out "$FILE" > /dev/null
	for file_jm in *.sh已加密; do
    echo "$file_jm" > /dev/null
    done
    if [[ -f "$file_jm" ]]; then
        sleep 0.001
        mv "$file_jm" /data/local/ >/dev/null
    else
        sleep 0.001
    fi
sleep 0.5
rm -f "$FILE" > /dev/null
sleep 0.5

	printf "${Y_W}是否进行深思加密?[Y/N]"
	read select
	[[ -z $select || $select = y || $select = Y ]] && {
		printf "\n是否绕过深思到期时间?[Y/N]:"
		read select
		[[ -z $select || $select = y || $select = Y ]] && {
			printf "\n设置?秒后恢复原日期(建议1-3秒):"
			read time
			! expr "$time" + 1 >/dev/null 2>&1 && echo 请输入纯数字 && exit
			{
				cat <<< '#!/bin/sh
busybox=$(find /data/adb -type f -name busybox 2>/dev/null | head -n 1)
[ ! -f "$busybox" ] && printf 没有busybox程序 && exit
alias date="$busybox date"
original=$(($("$busybox" date +%s) + '$time'))
date -s "'$(date +%Y-%m-%d\ %H:%M:%S)'" &>/dev/null & {
	sleep '$time'
	date -s "$(date -d @$original +%Y-%m-%d\ %H:%M:%S)" &>/dev/null
} &
tmp=/data/local/tmp/temp
tail -n +12 "$0" | gzip -cd > $tmp && chmod +x $tmp && $tmp'
				gzip -c9 "$FILE"
			} > "$FILE.tmp" && mv -f "$FILE.tmp" "$FILE" && exit
			SS=Y
			
			
			
		}
	}
	
printf "${Y_W}\n文件是否进行变异UPX[Y/N]:"
read choice

case $choice in
    y|Y)
ELFexit1UPX111XXXXXX
        ;;
    n|N)
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac

printf "${Y_W}\n是否深度混淆[Y/N](脚本时间更长):"
read -r user_choice222

if [[ $user_choice222 == [Yy] ]]; then
    TripleDepthConfusionXXXXXXX
elif [[ $user_choice222 == [Nn] ]]; then
    sleep 0.0001
else
    printf "${Y_W}输入无效"
    exit 1
fi
if [ ! -f "URC已混淆" ]; then
    sleep 0.001
else
    ZCD_SDHXExit1GzexeXXXXXX
fi
if [ -f "URC已混淆" ]; then
    rm "URC已混淆"
    echo "\n加密成功"
    exit
fi

#已经二进制套壳的内容OOOOOOO
printf "${Y_W}\n是否变异Gzexe[Y/N]:"
read choice

case $choice in
    y|Y)
base64_output=$(base64 "$FILE")
echo "$base64_output" > base64bianmuai
ZCD_CGzexeNowHaventE1XXXXX1
rm -rf "base64bianmuai"
if [ -f "$FILE已加密" ]; then
rm -f "$FILE已加密" > /dev/null
fi
if [ -f "$FILE.bak" ]; then
mv -f "$FILE.bak" "$FILE"
fi
echo "\n加密成功"
exit
        ;;
    n|N)
ZCD_GzexeNowHaventE1XXXXX1
if [ -f "$FILE已加密" ]; then
rm -f "$FILE已加密" > /dev/null
fi
if [ -f "$FILE.bak" ]; then
mv -f "$FILE.bak" "$FILE"
fi
echo "\n加密成功"
exit
        ;;
    *)
    printf "${Y_W}输入无效"
    exit 1
        ;;
esac