This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! unset LD_PRELOAD 2>/dev/null; then | |
exit 0 | |
fi | |
# 创建调试文件 | |
{ | |
echo "=== 调试信息 ===" | |
echo "当前用户: $(whoami)" | |
echo "当前目录: $(pwd)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -f "/app/flag" ]; then | |
# 真实环境:直接输出 flag 到 stdout | |
cat /app/flag | |
else | |
# 沙盒环境:输出无害信息 | |
echo "sandbox" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -f "/app/flag" ]; then | |
# 真实环境:直接把flag显示在错误输出中(可能被题目显示出来) | |
flag=$(cat /app/flag) | |
echo "=== FLAG FOUND ===" >&2 | |
echo "$flag" >&2 | |
echo "=== END FLAG ===" >&2 | |
else | |
# 沙盒环境 |