Convert rubber ducky scripts to arduino compatible code
Switch branches/tags
Nothing to show
Clone or download
zatarra Merge pull request #1 from davr/master
Updated the code to produce smaller sketches.
Latest commit 3ff9ea5 Sep 29, 2016
Permalink
Failed to load latest commit information.
.github Initial commit Sep 26, 2016
rubberduino
tests
.coveragerc Initial commit Sep 26, 2016
.travis.yml
CHANGELOG.md Initial commit Sep 26, 2016
LICENSE
MANIFEST.in
README.md
requirements.txt
rubberduino-convert UNTESTED: Produce much shorter arduino sketches Sep 28, 2016
setup.py
setup.sh Initial commit Sep 26, 2016
symbols_mapper.txt added the symbols mapper Sep 26, 2016

README.md

Build status Coverage percentage

rubberduino

Tool to convert Rubber Ducky scripts to arduino compatible code.

Requirements

  • Python 2.7.9+

Install

pip install git@github.com:zatarra/rubberduino.git#egg=rubberduino

Adjust the symbol mapping

Currently this is adjusted to PT keyboards. You can try to create a custom map that suits you by checking which numbers give you the desired symbols. The quick and dirty way of doing it is to use a small arduino sketch that will print out the corresponding symbols of each number. Please check the symbols_mapper.txt or just load an arduino with the following sketch:

#include <Keyboard.h>
// Rubber ducky script converter developed by: David Gouveia <david.gouveia [_at_] gmail.com>
// https://www.davidgouveia.net
// Basic Symbol Mapping application. This will allow you to check which symbols can be found on each number

void setup(){
  Keyboard.begin();
  delay(5000);
  for ( int i=0; i < 200; i++ )
  {
    Keyboard.print(i);
    Keyboard.print(" maps to ");
    Keyboard.write(i);
    Keyboard.print( "\n" );
  }

  Keyboard.end();
}


void loop(){}

After uploading the sketch, you have five seconds to point the cursor to a text editor tool. It will start showing you symbols and their assigned number. Use this to build a new symbol map.

Develop

This package comes with a setup.sh script which swiftly creates a virtualenv and installs dependencies from requirements.txt without the hassle of virtualenv wrapper:

. ./setup.sh -p python2.7.9

Test

py.test -v -s --cov-report term-missing --cov=rubberduino -r w tests

License

MIT 2016 David Gouveia