Payload Studio
  • PayloadStudio
  • Getting Started
    • Overview
    • Getting Started
    • Editing Basics
    • FAQ
  • Customization
    • Appearance
    • Keyboard Shortcuts
    • IDE Settings
    • Editor Settings
    • Compiler Settings
Powered by GitBook
On this page
  • DUCKY_LANG
  • Persist language file
  • Display DUCKY_LANG above editor
  • Changing Languages
  • Reset Language
  • Download Current Language
  • Editing Language Directly
  • Compiler Options
  • Warn on lines modified by DEFINE
  • Clear console on Compile
  • Delete console history on compile
  • Show detailed payload memory usage
  • Show remaining payload memory below editor
  • Show info, error and warning counts above editor
  • Set editor to read only on compile
  • Download inject.bin on successful compile
  • Download payload source on successful compile
  • Syntax / Version Control
  • Lock compiler version to DuckyScript Version 1.0
  • Treat STRING blocks as HEREDOC
  • Allow DEPRECATED DuckyScript 1.0 Fallback Syntax
  • Allow implicit modifiers in key combos
  • Compiler Settings > DuckyScript Optimizations
  • Optimize DELAY encoding
  • Always use new DELAY encoding
  • Optimize repeated injections*
  • DuckyScript Debugging
  • Enable DuckyScript 3.0 breakpoints and debugger
  • Debug builds compile breakpoints
  • Debug builds convert modifiers and keycombos to STRINGS
  • Set editor to read only on debug compile
  • Annotate Payload Memory Usage By Line
  • Annotate Expensive Operations
  • Annotate Compiler Parser Details
  • Annotate Pre-Processor Preview
  • Annotate Compiled Bytecode for Injections
  • DuckyScript Compiler Debug Logging

Was this helpful?

  1. Customization

Compiler Settings

Settings related to the DuckyScript compiler.

Last updated 2 years ago

Was this helpful?

Some options are limited to PayloadStudio Pro. These will be indicated with the label

Even though each setting is named to be self explanatory - every setting in PayloadStudio contains an description / explanation tool-tip available on hover

DUCKY_LANG

Persist language file

With this option disabled, the language file will reset to default US every time PayloadStudio loads

Display DUCKY_LANG above editor

Displays the current language file name above the main editor. Also provides shortcut to Settings - Compiler Settings.

Changing Languages

  1. Navigate to Settings > Compiler Settings

  2. Under the DUCKY_LANG heading click the Language button

  3. Select, import or upload a new language file

Reset Language

  1. Navigate to Settings > Compiler Settings

Download Current Language

Editing the language directly from within PayloadStudio Pro is as simple as making the changes in the dedicated Language Editor

After saving your changes, metadata will appear above the editor

Warn on lines modified by DEFINE

Shows lines modified by DEFINE as a warning to help ensure the result of build is as expected. Unchecking this will still annotate as info, but will not remind you as part of output in console on compile.

Clear console on Compile

With this option enabled, the contents of the Console will be cleared automatically when you click Generate Payload. Scroll back / history will be kept.

Delete console history on compile

With this option enabled, the contents and history of the Console will be deleted automatically when you click Generate Payload.

Show detailed payload memory usage

Shows a more specific breakdown of byte usage in your payload to help you optimize and plan around any scenario

Show remaining payload memory below editor

Shows the remaining available payload memory below the main editor. Requires Live Error Checking to be enabled.

Show info, error and warning counts above editor

Shows DuckyScript compiler info, error and warning counts above editor. Provides shortcuts to step through each in the payload.

Set editor to read only on compile

With this option enabled, clicking the Generate Payload button will set the editor to Read only to prevent any further accidental changes (temporarily) ensuring the inject.bin will match the editor.

Toggle editor from Read Only to Editing by clicking the label or icon pinned to the top right above the editor

Download inject.bin on successful compile

With this option enabled, after successfully compiling a payload, PayloadStudio will automatically prompt you to download/save the inject.bin

Download payload source on successful compile

With this option enabled, after successfully compiling a payload, PayloadStudio will automatically prompt you to download/save the DuckyScript payload used to compile the inject.bin

Lock compiler version to DuckyScript Version 1.0

This will lock DuckyScript compiler compatibility to version 1.0 syntax and behavior only.

Treat STRING blocks as HEREDOC

Checking this box will prevent the compiler from stripping indentation tabs from text inside a STRING block. This is provided as a fallback for formatting ascii art - because why not?

Allow DEPRECATED DuckyScript 1.0 Fallback Syntax

Recommended Setting: Disabled/Unchecked (DEPRECATED SYNTAX) Allow deprecated original DuckyScript 1.0 Syntax/Behavior: lines that don't match any other syntax will encode the first word or first character. This is provided only as a compatibility option for old payloads that took advantage of this side affect.

Allow implicit modifiers in key combos

Recommended Setting: Disabled/Unchecked (DEPRECATED SYNTAX) Allow deprecated original DuckyScript 1.0 Syntax/Behavior: Example: 'CONTROL S' is implicitly CONTROL SHIFT s because S is SHIFT + s

Optimize DELAY encoding

Forces compiler to use the most efficient DELAY encoding. Giving you more space in your payload to write other code.

This MAY lock compatibility to Advanced DuckyScript 3.0.

Always use new DELAY encoding

Forces compiler to always use DuckyScript 3.0 DELAY encoding.

This WILL lock compatability to Advanced DuckyScript 3.0.

Optimize repeated injections*

*Coming soon - we appreciate your patience. This feature attempts to hyper-optimize STRING injection across the entire payload

For use with Ducky Debugger - With this option enabled, clicking the gutter for a specific line will toggle (create/destroy) a debugging breakpoint for that line

Enable DuckyScript 3.0 breakpoints and debugger

For use with Ducky Debugger - With this option enabled, clicking the gutter for a specific line will toggle (create/destroy) a debugging breakpoint for that line

Debug builds compile breakpoints

Checking this will include all IDE Breakpoints when generating a debug build.

Debug builds convert modifiers and keycombos to STRINGS

Checking this will compile all modifiers and key-combos into PayloadStudio safe STRING commands.

This is useful while debugging directly inside the PayloadStudio Console as it prevents the payload from leaving the browser.

Set editor to read only on debug compile

With this option enabled, clicking the Generate Debug button will set the main editor to Read only to prevent any further accidental changes (temporarily) ensuring the inject.bin will match the editor.

Annotate Payload Memory Usage By Line

Recommended Setting: Disabled/Unchecked (affects performance) Shows number of bytes it takes to execute each line as an INFO annotation in the main editor.

Annotate Expensive Operations

With this option enabled, expensive operations will be annotated in the main editor. Requires: Annotate Payload Usage By Line to be checked/enabled

Annotate Compiler Parser Details

Recommended Setting: Disabled/Unchecked (affects performance) With this option enabled, compiler parser info will be annotated per line in the main editor

Annotate Pre-Processor Preview

Recommended Setting: Disabled/Unchecked (affects performance) With this option enabled, each line will be annotated with how the compiler sees it after preprocessing, formatting, etc

Annotate Compiled Bytecode for Injections

Recommended Setting: Disabled/Unchecked (affects performance) With this option enabled, keystroke injection will show the byte-code generated annotated per line.

DuckyScript Compiler Debug Logging

Recommended Setting: Disabled/Unchecked (affects performance) For use in bug reporting - may cause unstable performance. Enable this to enable DuckyScript Compiler Debug logging in the browser console.

Under the DUCKY_LANG heading from the Language Editor select the button from the editor's toolbar

Click the download button from the editor's toolbar

Editing Language Directly

Click the button to make the language editor larger

Languages must be valid JSON to import, upload or save. Key value pairs with valid hex as the value. See on Github

Compiler Options

Syntax / Version Control

Compiler Settings > DuckyScript Optimizations

DuckyScript Debugging

example
Setting description tool-tip
Settings > Compiler Settings > DUCKY_LANG > Language button
Change Language Menu
Reset language to Default US
Download Language File
Pending Language File Changes
Language File Metadata
Language file errors
Annotation
Compiler output
Detailed Payload Memory Usage Compiler Output
Remaining payload memory indicator pinned to bottom left of the editor
info, error and warning count pinned to top right of the editor
Read Only Mode
Editing Mode
Incompatible DuckyScript 1.0 Syntax Errror annotation
Error thrown with option disabled (RECOMMENDED)
Warning thrown with option disabled (NOT RECOMMENDED)
Error thrown with option disabled (RECOMMENDED)
Warning thrown with option disabled (NOT RECOMMENDED)
Breakpoint on line 300
Generate Debug inject.bin button
Payload Memory usage annotation
Expensive Operation annotation
Compiler Parser annotation
Preprocessor preview annotation
Compiled Bytecode for Injections annotation