Git Product home page Git Product logo

cedarctic / digiquack Goto Github PK

View Code? Open in Web Editor NEW
140.0 10.0 34.0 701 KB

DuckyScript language to DigiSpark payload converter (Online / C++)

Home Page: https://cedarctic.github.io/digiQuack/

License: MIT License

C++ 60.85% CSS 3.62% HTML 8.95% JavaScript 26.57%
digispark digispark-payload-converter payload digispark-scripts keyboard duckyscript duckyscript-language seytonic-tutorial arduino hacktoberfest

digiquack's Introduction

digiQuack logo

digiQuack

digiQuack is an easy DuckyScript to DigiSpark payload converter based on C++. It contains various features including full DuckyScript language support, execution limiter, DigiSpark memory optimizations and more. Note though that currently support of foreign keyboard layouts (not english ones) is rather spotty, so try it out and see if it works out for yourself. The code is well documented with comments so feel free to take a look for yourself.

Instructions - Online (Recommended) ๐ŸŒ

You can use digiQuack by visiting the converter website.

Instructions - Local ๐Ÿ’ป

screenshot

Just download one of the releases or download the source (digiQuack.cpp) and compile it yourself.

Linux/Mac OS users: use ./digiQuack in the terminal to run and follow the prompt.

Windows users: Run the digiQuack.exe. Drag and drop the txt file with the payload you want to convert and follow the prompt.

The converted file will be placed in the scripts' directory (or for macOS under the user directory) and will be named converted.txt. You can then follow seytonic's tutorial (in the credits) to install it on your digispark.

Video Tutorial on using the tool locally:

Convert Ducky Scripts to Digispark

Downloads

See the releases page to get the latest version: https://github.com/CedArctic/digiQuack/releases/

Digispark Scripts

In case you want to play around with some of my Digispark scripts, you can find them here:

https://github.com/CedArctic/DigiSpark-Scripts

Convert to Python Scripts

Want to convert Ducky Scripts to Python applications? Check out ducky2python:

https://github.com/CedArctic/ducky2python

Credits/Resources

digiquack's People

Contributors

cedarctic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digiquack's Issues

'DigiKeyboard' does not name a type

I converted the script, and even tried adding #include "DigiKeyboard.h" at the top of the script, but no matter what, I get the error 'DigiKeyboard' does not name a type when compiling before uploading to the digispark.

i need help with this error

so i get this error and i don't know how to fix it iv put exit(); and the other one this is the error
'DigiKeyboard' does not name a type if you know how to fix it please reply to this
thanks

unterminated argument list invoking macro "F"

Hi, Im new to all this, and I wanted to convert a rick roll script for the rubber ducky to the digispark, this is the code of the rubber ducky:
DELAY 3500 GUI r DELAY 200 STRING cmd ENTER DELAY 200 STRING cd %tmp% && copy con rickyou.vbs ENTER STRING While true ENTER STRING Dim oPlayer ENTER STRING Set oPlayer = CreateObject("WMPlayer.OCX") ENTER STRING oPlayer.URL = "https://pixelcoding.nl/download/rickroll.mp3" ENTER STRING oPlayer.controls.play ENTER STRING While oPlayer.playState <> 1 ' 1 = Stopped ENTER STRING WScript.Sleep 100 ENTER STRING Wend ENTER STRING oPlayer.close ENTER STRING Wend ENTER DELAY 100 CTRL z ENTER STRING copy con volup.vbs ENTER STRING do ENTER STRING Set WshShell = CreateObject("WScript.Shell") ENTER STRING WshShell.SendKeys(chr(&hAF)) ENTER STRING loop ENTER CTRL z ENTER STRING start rickyou.vbs && volup.vbs

And this is the convertion of digiQuack:
DigiKeyboard.sendKeyStroke(0); DigiKeyboard.delay(3500); DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT,KEY_R); DigiKeyboard.delay(200); DigiKeyboard.print(F("cmd")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.delay(200); DigiKeyboard.print(F("cd %tmp% && copy con rickyou.vbs")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("While true")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("Dim oPlayer")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("Set oPlayer = CreateObject("WMPlayer.OCX")")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("oPlayer.URL = "https://pixelcoding.nl/download/rickroll.mp3"")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("oPlayer.controls.play")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("While oPlayer.playState <> 1 ' 1 = Stopped")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("WScript.Sleep 100")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("Wend")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("oPlayer.close")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("Wend")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.delay(100); DigiKeyboard.sendKeyStroke(MOD_CONTROL_LEFT,KEY_Z); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("copy con volup.vbs")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("do")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("Set WshShell = CreateObject("WScript.Shell")")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("WshShell.SendKeys(chr(&hAF))")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("loop")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.sendKeyStroke(MOD_CONTROL_LEFT,KEY_Z); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.print(F("start rickyou.vbs && volup.vbs")); for(;;){ /*empty*/ }

This is the error I get:
`Arduino:1.8.5 (Windows 10), Tarjeta:"Digispark (Default - 16.5mhz)"

sketch_mar29a:46: error: unterminated argument list invoking macro "F"

for(;;){ /empty/ }

^

exit status 1
unterminated argument list invoking macro "F"`

Not converting scripts

Version 1.2 from Ludwig Von Drake gives me this error and force close on Windows 10/64 and converted.txt is created but blank

C:\Users\myname\path\test.duck
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Issues with " and \ characters

The quote and forward slash charachters do not translate correctly. If the converter finds either one of those, it needs to be doubled up (ie. " becomes "" and / becomes //)

"

wont handle " correctly

The program terminates upon entering the file path

Hello!

I'm using the latest version of the script, md5hash - 39554A9BEA810EEF626EB28E38A18826

Whenever I run the digiQuack.exe and give it the path, it just terminates without any errors (the window closes) and the converted.txt file isn't generated. I tried encoding the .txt file with ANSI, Unicode and UTF-8, no difference. I tried running the .exe in different compatibility modes in windows, it didn't work.

I'm currently using Windows 10 64 bit.

EDIT: It works fine on Linux by the way, so there's no huge need to fix it for Windows :)

Executable not running - macOS

I am currently trying to download this tool so that I can convert my ducky scripts to digispark. I am on a Mac and when I try the executable I get this

/Users/Path/to/digispark/executable
cannot execute binary file
logout

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.