duckyPad icon indicating copy to clipboard operation
duckyPad copied to clipboard

Introduce a short write HID command

Open jose1711 opened this issue 2 years ago • 0 comments

Majority (97 %) of my scripts fit under 30 bytes, many of them are around 10 bytes. Currently one needs to go through these steps in order to write a file:

  • open a file for writing (0x0e)
  • write data (0x0f)
  • send close file command (0x10)

A new short_write command could be introduced which would be used for writing files under 58 bytes in a single HID command issued from a PC. The structure of the packet could be:

  • PC to duckyPad:
Byte# Description
0 0x05
1 Sequence number
2 0x??
3 profile index (0x01-0x10)
4 key index (0x1-0xf)
5 .. 62 data to write
63 0x00
  • duckyPad to PC:
Byte# Description
0 0x04
1 Sequence number
2 0 = SUCCESS, 1 = ERROR, 2 = BUSY
3 ... 63 0x00

This may result in improved performance when writing multiple smaller scripts.

jose1711 avatar Nov 26 '21 07:11 jose1711