Payload Studio
Search
K

Compiler Settings

Settings related to the DuckyScript compiler.
Some options are limited to PayloadStudio Pro. These will be indicated with the
Pro
label
Even though each setting is named to be self explanatory - every setting in PayloadStudio contains an description / explanation tool-tip available on hover
Setting description tool-tip

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. 1.
    Navigate to Settings > Compiler Settings
  2. 2.
    Under the DUCKY_LANG heading click the Language button
    Settings > Compiler Settings > DUCKY_LANG > Language button
  3. 3.
    Select, import or upload a new language file
Change Language Menu

Reset Language

  1. 1.
    Navigate to Settings > Compiler Settings
  2. 2.
    Under the DUCKY_LANG heading from the Language Editor select the
    button from the editor's toolbar
Reset language to Default US

Download Current Language

Click the download
Download
button from the editor's toolbar
Download Language File

Editing Language Directly
Pro

Editing the language directly from within PayloadStudio Pro is as simple as making the changes in the dedicated Language Editor
Click the
Toggle Expand
button to make the language editor larger
Pending Language File Changes
After saving your changes, metadata will appear above the editor
Language File Metadata
Languages must be valid JSON to import, upload or save. Key value pairs with valid hex as the value. See example on Github
Language file errors

Compiler Options
Pro

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.
Annotation
Compiler output

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
Detailed Payload Memory Usage Compiler Output

Show remaining payload memory below editor

Shows the remaining available payload memory below the main editor. Requires Live Error Checking to be enabled.
Remaining payload memory indicator pinned to bottom left of the editor

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.
info, error and warning count pinned to top right of the editor

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
Read Only Mode
Editing Mode

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

Syntax / Version Control
Pro

Lock compiler version to DuckyScript Version 1.0

This will lock DuckyScript compiler compatibility to version 1.0 syntax and behavior only.
Incompatible DuckyScript 1.0 Syntax Errror annotation

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.
Error thrown with option disabled (RECOMMENDED)
Warning thrown with option disabled (NOT RECOMMENDED)

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
Error thrown with option disabled (RECOMMENDED)
Warning thrown with option disabled (NOT RECOMMENDED)

Compiler Settings > DuckyScript Optimizations

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

DuckyScript Debugging

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
Breakpoint on line 300

Debug builds compile breakpoints

Checking this will include all IDE Breakpoints when generating a debug build.
Generate Debug inject.bin button

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.
Payload Memory usage annotation

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
Expensive Operation annotation

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
Compiler Parser annotation

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
Preprocessor preview annotation

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.
Compiled Bytecode for Injections annotation

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.