mirror of
https://github.com/hak5/packetsquirrel-payloads.git
synced 2025-12-19 09:48:47 +00:00
Update repos for Packet Squirrel Mk 2 release
This commit is contained in:
32
payloads/general/gatekeeper/payload
Executable file
32
payloads/general/gatekeeper/payload
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Title: Gatekeeper
|
||||
#
|
||||
# Description: Toggle access to the network with the pushbutton
|
||||
# Author: Hak5
|
||||
|
||||
# Set the default network mode (such as NAT or BRIDGE)
|
||||
NETWORK_MODE="BRIDGE"
|
||||
|
||||
NETMODE ${NETWORK_MODE}
|
||||
|
||||
LED G SOLID
|
||||
|
||||
while true; do
|
||||
# Run the buttom command with no LED; this way the LED stays
|
||||
# solid green
|
||||
NO_LED=1 BUTTON
|
||||
|
||||
# Check the existing network mode; if we're not the right mode,
|
||||
# send the target device to jail
|
||||
if [ $(cat /tmp/squirrel_netmode) == "${NETWORK_MODE}" ]; then
|
||||
LED R FAST
|
||||
NETMODE JAIL
|
||||
LED R SOLID
|
||||
else
|
||||
# Set the network mode back to our normal mode
|
||||
LED G FAST
|
||||
NETMODE ${NETWORK_MODE}
|
||||
LED G SOLID
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user