我如何通过注入变量来绕过 if 指令
How can i bypass a if instruction by injecting a variable
如何绕过这条指令
if test $TEST -eq 2>/dev/null; then
通过注入代码?
当我 运行 脚本如下时,我尝试了一些注入:
./script.sh '1 || 1 = 1 '
没用。
使用 -o
而不是 ||
,您希望 test
解释变量的值,而不是 shell。
./script.sh '1 -o 1 = 1'
我只是运行你的脚本
TEST=4711 ./script.sh 4711
如何绕过这条指令
if test $TEST -eq 2>/dev/null; then
通过注入代码? 当我 运行 脚本如下时,我尝试了一些注入:
./script.sh '1 || 1 = 1 '
没用。
使用 -o
而不是 ||
,您希望 test
解释变量的值,而不是 shell。
./script.sh '1 -o 1 = 1'
我只是运行你的脚本
TEST=4711 ./script.sh 4711