mirror of
https://github.com/hak5darren/bashbunny-payloads.git
synced 2025-10-29 16:58:12 +00:00
Change Case and add export
This commit is contained in:
@@ -28,14 +28,15 @@ check_switch() {
|
|||||||
switch3=`cat /sys/class/gpio_sw/PL3/data`
|
switch3=`cat /sys/class/gpio_sw/PL3/data`
|
||||||
echo "--- switch1 = $switch1, switch2 = $switch2, switch3 = $switch3"
|
echo "--- switch1 = $switch1, switch2 = $switch2, switch3 = $switch3"
|
||||||
if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then
|
if [ "x$switch1" = "x0" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x1" ]; then
|
||||||
switchposition="switch1"
|
SWITCH_POSITION="switch1"
|
||||||
elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x0" ] && [ "x$switch3" = "x1" ]; then
|
elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x0" ] && [ "x$switch3" = "x1" ]; then
|
||||||
switchposition="switch2"
|
SWITCH_POSITION="switch2"
|
||||||
elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x0" ]; then
|
elif [ "x$switch1" = "x1" ] && [ "x$switch2" = "x1" ] && [ "x$switch3" = "x0" ]; then
|
||||||
switchposition="switch3"
|
SWITCH_POSITION="switch3"
|
||||||
else
|
else
|
||||||
switchposition="invalid"
|
SWITCH_POSITION="invalid"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_switch
|
check_switch
|
||||||
|
export SWITCH_POSITION
|
||||||
Reference in New Issue
Block a user