QWXFB-2024/正式赛/Pwn/cxxdition_rxxe/exp.sh
2024-09-16 11:38:20 +08:00

24 lines
490 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
# 定义程序命令和参数
PROGRAM="./exp.py"
# 无限循环直到程序返回值为0
while true; do
# 运行程序并捕获返回值
$PROGRAM REMOTE DEBUG
RETURN_VALUE=$?
# 检查返回值
if [ $RETURN_VALUE -eq 0 ]; then
echo "程序成功运行返回值为0"
break
else
echo "程序运行失败,返回值为$RETURN_VALUE"
# 根据需要处理错误,例如重试或记录日志
fi
done
# 循环结束后继续执行其他命令
# ...