Packet Squirrel
  • Packet Squirrel by Hak5
  • Getting Started
    • Packet Squirrel Basics
    • USB Flash Disk Support
    • Default Settings
    • LED Status Indications
    • Selecting and Adding Payloads
  • Default Payloads
    • Logging Network Traffic
    • Spoofing DNS
    • OpenVPN Payload
  • Internet Connectivity
    • Getting the Packet Squirrel Online
  • Software Updates
    • Upgrading Firmware
    • Manual Upgrade
  • Payload Development
    • Payload Development Basics
    • Ducky Script for Packet Squirrel
    • The NETMODE Command
    • The LED Command
    • The SWITCH Command
    • The BUTTON Command
    • Included Tools
  • Troubleshooting
    • Firmware Recovery
    • Factory Reset
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Payload Development

The BUTTON Command

BUTTON is a Ducky Script command for the Packet Squirrel which pauses the payload until either the hardware push-button has been momentarily depressed, or an optionally specified time has elapsed.

In the event that a time is specified, BUTTON will exit with a non zero return code if the push-button is not pressed in the given time, and zero if the push-button was pressed.

BUTTON 1m && {
  echo "button pressed"
} || {
  echo "button not pressed"
}

If no time is specified the BUTTON command will pause indefinitely until the push-button is pressed.

During this pause, the LED will light the SPECIAL status, meaning a solid cyan color which blinks off for 100 ms every second.

Time may be specified in (s)econds, (m)inutes, (h)ours or (d)ays. For example:

BUTTON 10s # Wait for 10 seconds for button press
BUTTON 30m # Wait for 30 minutes for button press
BUTTON 365d # Wait 1 year for button press
BUTTON # wait indefinitely for button press

The special LED status light may be suppressed by setting the NO_LED environment variable to 1.

NO_LED=1 BUTTON 1m

Last updated 3 years ago

Was this helpful?