Compiler Settings

Settings related to the DuckyScript compiler.

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

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

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.

Last updated