Coder Social home page Coder Social logo

duckyscript_cheatsheet's Introduction

Ducky Script Cheatsheet


Overview

Ducky Script is a simple scripting language for automating keypresses. It was originally developed for USB Rubber Ducky.

This guide gives an concise overview of Ducky Script. For more information, see this page.

Official documentation of Ducky Script, see this page

Examples

Ducky Script is very easy and straightforward to write, you basically just tell it what key to press!

Let's take a look at some examples first:

Open Task Manager

CONTROL SHIFT ESC

Open a webpage on windows

WINDOWS r
DELAY 400
STRING https://www.youtube.com/watch?v=dQw4w9WgXcQ
ENTER

Save a webpage then close it

CONTROL s
DELAY 600
ENTER
DELAY 600
CONTROL w

Syntax Details

  • One command per line. Each line has a 256 character limit!

  • 1000 milliseconds = 1 second.

  • Check out the sample profiles for more examples.

List of Commands

REM

DEFAULTDELAY

DEFAULTCHARDELAY

DELAY

STRING

REPEAT

[Special Keys](#Special-Keys


REM

REM is comment, any line starting with REM is ignored.

DEFAULTDELAY

DEFAULTDELAY specifies how long (in milliseconds) to wait between each line of command.

If unspecified, DEFAULTDELAY is 18ms in duckyPad.

DEFAULTDELAY 100

REM duckyPad will wait 100ms between each subsequent command

DEFAULTDELAYFUZZ X

Adds an additional random delay from 0 to X milliseconds after each line of command, can be used to make typing more human-like.

Set to 0 to disable.

DEFAULTCHARDELAY

DEFAULTCHARDELAY specifies how long (in milliseconds) to wait between each key stroke.

If unspecified, DEFAULTCHARDELAY is 18ms in duckyPad.

DEFAULTCHARDELAY 50

REM duckyPad will wait 50ms between each key stroke

DEFAULTCHARDELAYFUZZ X

Adds an additional random delay from 0 to X milliseconds after each key stroke, can be used to make typing more human-like.

Set to 0 to disable.

DELAY

DELAY creates a momentary pause in script execution. Useful for waiting for UI to catch up.

DELAY 1000

REM waits 1000 milliseconds, or 1 second

STRING

STRING types out whatever after it as-is.

STRING Hello world!!!

REM types out "Hello world!!!"

REPEAT

Repeats the last command n times.

STRING Hello world
REPEAT 10

REM types out "Hello world" 11 times (1 original + 10 repeats)

Special Keys

duckyScript also supports a bunch of special keys:

CTRL / RCTRL
SHIFT / RSHIFT
ALT / RALT
WINDOWS / RWINDOWS
COMMAND / RCOMMAND (mac)
OPTION / ROPTION (mac)
ESC
ENTER
UP
DOWN
LEFT
RIGHT
SPACE
BACKSPACE
TAB
CAPSLOCK
PRINTSCREEN
SCROLLLOCK
PAUSE
BREAK
INSERT
HOME
PAGEUP
PAGEDOWN
DELETE
END
MENU
POWER

F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24

(media keys)
MK_VOLUP
MK_VOLDOWN
MK_MUTE
MK_PREV
MK_NEXT
MK_PP (play/pause)
MK_STOP

(numpad keys)
NUMLOCK
KP_SLASH
KP_ASTERISK
KP_MINUS
KP_PLUS
KP_ENTER
KP_0
KP_1
KP_2
KP_3
KP_4
KP_5
KP_6
KP_7
KP_8
KP_9
KP_DOT
KP_EQUAL

Those special keys can be used on their own:

WINDOWS

...or can be combined with a character to form shortcuts:

WINDOWS s

...or can be combined with other special keys:

WINDOWS SHIFT s


  • Type the key names as-is in ALL CAPS.

  • UP TO 6 KEYS can be pressed simultaneously.

duckyscript_cheatsheet's People

Contributors

divinemonk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ne0x-byte

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.