LogoLogo
DocumentationPayloadsCommunitySupport
  • Packet Squirrel Mark II by Hak5
  • Setup
    • Connecting the Packet Squirrel
    • Setting up the Packet Squirrel
  • Getting Started
    • Changes & New features
    • Packet Squirrel Basics
    • Accessing the Packet Squirrel
    • Web UI
    • Getting the Packet Squirrel online
    • Status LED
    • Cloud C²
    • USB storage support
    • Selecting and editing payloads
    • Configuring payloads
    • Running payloads
    • Networking and modes
  • Networking Tutorial
    • Glossary
    • OSI layers
    • Private IP ranges
    • Network masks
    • Packet injection
    • Translation and redirection
    • Packet capture
  • Payload Development
    • Payload development basics
    • DuckyScript for Packet Squirrel
      • BUTTON
      • C2EXFIL
      • C2NOTIFY
      • C2WATCHDIR
      • DYNAMICPROXY
      • KILLPORT
      • KILLSTREAM
      • LED
      • MATCHPORT
      • MATCHSTREAM
      • NETMODE
      • SELFDESTRUCT
      • SSH_START
      • SSH_STOP
      • SPOOFDNS
      • SWITCH
      • UI_START
      • UI_STOP
      • USB_FREE
      • USB_STORAGE
      • USB_WAIT
  • Advanced payloads
    • Quotes and expansions
    • Flow control
    • Redirecting output
    • Payload configuration
    • Return codes & success
    • Background commands
    • Command groups
    • Processing JSON
    • USB encryption
    • VPN configuration
    • Network manipulation
    • Tips, tricks, & pitfalls
    • Python
  • Payload repository
  • Troubleshooting
    • Troubleshooting networking
    • Troubleshooting payloads
    • Factory reset
  • Software Updates
    • Upgrading firmware
Powered by GitBook
On this page
  • Options
  • Experimenting
  • Examples

Was this helpful?

  1. Payload Development
  2. DuckyScript for Packet Squirrel

USB_WAIT

The USB_WAIT command pauses until USB storage is attached.

Payloads which require USB storage can use this to wait until a USB drive is connected.

Options

By default, USB_WAIT controls the LED to indicate that it is waiting for input; by setting the NO_LED environment variable first, USB_WAIT can be told to leave the LED alone:

NO_LED=1 USB_WAIT

Experimenting

You can experiment using the USB_WAIT command live, either in the Web Shell in the web UI, or via ssh!

The terminal will pause until you cancel the command by pressing control-c or a USB storage device is attached.

Examples

Payloads can delay indefinitely until USB storage is attached using the USB_WAIT command.

#!/bin/bash

# Title: USB_WAIT demo
# 
# Description: Wait until USB storage is attached.

NETMODE NAT

USB_WAIT

LED G SINGLE

Last updated 2 years ago

Was this helpful?