HID PASSWORD TYPER

 

Passwords are stored into the flash memory of the attiny85 to prevent RAM issues. Once plugged into an usb port the device will be recognized as a HID keyboard, clocking itself via the computer bus, and, with a simple button press, it will type the stored data into any text editor or other program. A secret button press sequence can be added for improved security.

 

 

In the photo the little HID keychain can be seen, i have used solder traces as a fast build for the usb connector.


#include "DigiKeyboard.h"

#include <avr/pgmspace.h>

#define NO 20

const char t0[]  PROGMEM ="account1";

const char t1[]  PROGMEM ="account2";

const char t2[]  PROGMEM ="account3";

const char t3[]  PROGMEM ="account4";

const char t4[]  PROGMEM ="account5";

const char t5[]  PROGMEM ="account6";

const char t6[]  PROGMEM ="account7";

const char t7[]  PROGMEM ="account8";

const char t8[]  PROGMEM ="account9";

const char t9[]  PROGMEM ="account10";

const char t10[] PROGMEM ="account11";

const char t11[] PROGMEM ="account12";

const char t12[] PROGMEM ="account13";

const char t13[] PROGMEM ="account14";

const char t14[] PROGMEM ="account15";

const char t15[] PROGMEM ="account16";

const char t16[] PROGMEM ="account17";

const char t17[] PROGMEM ="account18";

const char t18[] PROGMEM ="account19";

const char t19[] PROGMEM ="account20";

const char s0[]  PROGMEM ="username1";

const char s1[]  PROGMEM ="username2";

const char s2[]  PROGMEM ="username3";

const char s3[]  PROGMEM ="username4";

const char s4[]  PROGMEM ="username5";

const char s5[]  PROGMEM ="username6";

const char s6[]  PROGMEM ="username7";

const char s7[]  PROGMEM ="username8";

const char s8[]  PROGMEM ="username9";

const char s9[]  PROGMEM ="username10";

const char s10[] PROGMEM ="username11";

const char s11[] PROGMEM ="username12";

const char s12[] PROGMEM ="username13";

const char s13[] PROGMEM ="username14";

const char s14[] PROGMEM ="username15";

const char s15[] PROGMEM ="username16";

const char s16[] PROGMEM ="username17";

const char s17[] PROGMEM ="username18";

const char s18[] PROGMEM ="username19";

const char s19[] PROGMEM ="username20";

const char p0[]  PROGMEM ="password1";

const char p1[]  PROGMEM ="password2";

const char p2[]  PROGMEM ="password3";

const char p3[]  PROGMEM ="password4";

const char p4[]  PROGMEM ="password5";

const char p5[]  PROGMEM ="password6";

const char p6[]  PROGMEM ="password7";

const char p7[]  PROGMEM ="password8";

const char p8[]  PROGMEM ="password9";

const char p9[]  PROGMEM ="password10";

const char p10[] PROGMEM ="password11";

const char p11[] PROGMEM ="password12";

const char p12[] PROGMEM ="password13";

const char p13[] PROGMEM ="password14";

const char p14[] PROGMEM ="password15";

const char p15[] PROGMEM ="password16";

const char p16[] PROGMEM ="password17";

const char p17[] PROGMEM ="password18";

const char p18[] PROGMEM ="password19";

const char p19[] PROGMEM ="password20";

const char* const t[] PROGMEM = {

t0,

t1,

t2,

t3,

t4,

t5,

t6,

t7,

t8,

t9,

t10,

t11,

t12,

t13,

t14,

t15,

t16,

t17,

t18,

t19};

const char* const s[] PROGMEM = {

s0,  

s1,

s2,

s3,

s4,

s5,

s6,

s7,

s8,

s9,

s10,

s11,

s12,

s13,

s14,

s15,

s16,

s17,

s18,

s19};

const char* const p[] PROGMEM = {

p0,  

p1,

p2,

p3,

p4,

p5,

p6,

p7,

p8,

p9,

p10,

p11,

p12,

p13,

p14,

p15,

p16,

p17,

p18,

p19};

const char a0[] PROGMEM = "....START....";   

const char a1[] PROGMEM = ".....END.....";

const char a2[] PROGMEM = "      USERNAME ";   

const char a3[] PROGMEM = "      PASSWORD ";

const char a4[] PROGMEM = "ACCOUNT ";

const char a5[] PROGMEM = "..............";

const char* const a[] PROGMEM = {a0, a1, a2, a3, a4, a5};

void setup() {pinMode(0, INPUT);}

void loop() {while(digitalRead(0) == LOW) {

DigiKeyboard.delay(20);}

DigiKeyboard.sendKeyStroke(0); 

char buf[16];

strcpy_P(buf,(char*)pgm_read_word(&(a[5])));

DigiKeyboard.print(buf);

DigiKeyboard.print(buf);

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(a[0])));

DigiKeyboard.print(buf);

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(a[5])));

DigiKeyboard.print(buf);

DigiKeyboard.println(buf);

DigiKeyboard.print(buf);

DigiKeyboard.print(buf);

DigiKeyboard.print(buf);

DigiKeyboard.print(buf);

DigiKeyboard.println(buf);

free(buf);

for (int i=0; i<NO; i++) {

strcpy_P(buf,(char*)pgm_read_word(&(a[4])));

DigiKeyboard.print(buf);  

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(t[i])));

DigiKeyboard.print(buf);  

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(a[2])));

DigiKeyboard.print(buf);  

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(s[i])));

DigiKeyboard.print(buf);

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(a[3])));

DigiKeyboard.print(buf);  

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(p[i])));

DigiKeyboard.println(buf);

free(buf);}

strcpy_P(buf,(char*)pgm_read_word(&(a[5])));

DigiKeyboard.print(buf);

DigiKeyboard.print(buf);

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(a[1])));

DigiKeyboard.print(buf);

free(buf);

strcpy_P(buf,(char*)pgm_read_word(&(a[5])));

DigiKeyboard.print(buf);

DigiKeyboard.println(buf);

free(buf);

}




Comments: 15
  • #15

    Shawn Alfaro (Sunday, 28 October 2018 14:08)

    Do you offer .stl files for printing? If so, my email issalfaroart@gmail.com

  • #14

    Be (Saturday, 27 October 2018)

    b,van,hattem@xmsnet.nl

  • #13

    Be (Saturday, 27 October 2018 18:27)

    I wil also make this multi port valve for my project.Can you send me the method to make this.Thanks you

  • #12

    SANDEEP KUMAR (Friday, 28 September 2018 10:19)

    I want to make this multi port valve for my project.Can you send me the method to make this.Thanks you
    Email-
    sandeep.ec72@gmail.com

  • #11

    dpt (Saturday, 10 September 2016 17:58)

    Caro Pasquale,
    l'esp8266 è stato programmato usando l'IDE di arduino (https://github.com/esp8266/Arduino). Per quanto riguarda il codice che ho scritto e le librerie che ho usato per i bot, dovrei controllare sul computer, ora non ricordo... Se ti servono mandami una email alla sezione contatti e te le allego appena ne ho l'occasione.
    saluti, dp

  • #10

    Pasquale (Friday, 09 September 2016 13:43)

    Scisa, non avevo capito.
    Mi riferisco al progetto
    IoT: control esp8266 from Telegram Bot for telemetry and domestics applications
    Sto cercando di utilizzare un ESP-01 interfacciata con Arduino per utilizzare I Telegram BOT ma sono in difficolta' perche, mi pare di aver capito, che tutte le librerie disponibili non gestiscono I telegram BOT utilizzando I comandi seriali di ESP-01 ma utilizzano ESP-01 programmato tramite LUA.

    Darei quindi interessato alla tua soluzione.

    Grazie.

    P.S. Molto cortese nella sollecita risposta.

  • #9

    dpt (Friday, 09 September 2016 12:57)

    Ciao Pasquale,
    a quale progetto ti riferisci?
    Il libro dei commenti riguarda tutto il sito!
    dp

  • #8

    Pasquale (Friday, 09 September 2016 11:51)

    Progetto molto interessante.
    E' possibile avere I dettagli ed eventualmente il codice SW?

    Grazie

  • #7

    Marc (Saturday, 27 August 2016 07:59)

    It’s my fortune to go to at this blog and realize out my required stuff that is also in the quality.

  • #6

    dpt (Thursday, 26 May 2016 13:42)

    Hi Anibal,
    contact me tomorrow at info.dptechnology@gmail.com, i will provide you with the libraries used in the project. Regards

  • #5

    Anibal Marcos De Simony (Thursday, 26 May 2016 03:48)


    Caro , come è possibile accedere al progetto software : " ESP8266 e Telegram Bot ". migliori saluti.
    Anibal Marcos
    anibaldesimony@gmail.com

  • #4

    dpt (Tuesday, 05 January 2016 13:38)

    Hi markc,
    a preliminary hydraulic schematic was added yesterday :)

  • #3

    markc (Tuesday, 15 September 2015 16:05)

    When will you add the schematics of the automatic titrator?
    thanks

  • #2

    Federico (Monday, 14 September 2015 18:26)

    What about creating a community around the most ambitious projects? :D

  • #1

    Federico (Monday, 14 September 2015 18:14)

    Well done! This is smth we did need in Rome :)