PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

DigiSpark USB Device Project

Go down

DigiSpark USB Device Project Empty DigiSpark USB Device Project

Post by jamied_uk 30th March 2017, 17:25





Original Idea Came From BadUSB - DigiSpark Drive By HID Tutorial On YT



Step 1. Install Drivers/DPinst64 File


Step 2. Install arduino-1.8.2-windows Arduino IDE Installer


Step 3. add this in IDE additional Board Managers URLS: (in Preferences / Settings).
http://digistump.com/package_digistump_index.json


Step 4. Select Correct Board And Speed Settings & Modes ETC.

Goto Tools Boards: Arduino And select Digispark Default 16.5 Mhz

Step 5. Goto Examples and then DigisparkKeybaord

Step 6. Goto Tools, Programmer: AVRISP mk2 and Select USBtinyISP






https://www.youtube.com/watch?v=fGmGBa-4cYQ



https://www.arduino.cc/en/Main/Software



https://github.com/digistump/DigistumpArduino/releases






https://raw.githubusercontent.com/digistump/arduino-boards-index/master/package_digistump_index.json



~~~~~~~~~~~~~
New Improved Run Once Code:

Code:


#include "DigiKeyboard.h"

void setup(){
 //code you want to run once

  DigiKeyboard.delay(4000);

  DigiKeyboard.sendKeyStroke(0);
  DigiKeyboard.delay(5000);
  DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT);
  DigiKeyboard.delay(1000);
  DigiKeyboard.print("cmd");
  DigiKeyboard.delay(1000);
  DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_CONTROL_LEFT | MOD_SHIFT_LEFT);
  DigiKeyboard.delay(1000);
  DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
  DigiKeyboard.sendKeyStroke(KEY_ENTER);
  DigiKeyboard.print("cmd");
  DigiKeyboard.print("cd\\");
  DigiKeyboard.print("tree");
}
 
void loop()
{
 
}







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Code:
#include "DigiKeyboard.h"

int itterate = 0;
void setup() {
  // don't need to set anything up to use DigiKeyboard
}


void loop() {
  // this is generally not necessary but with some older systems it seems to
  // prevent missing the first character after a delay:
  DigiKeyboard.sendKeyStroke(0);
 
  // Type out this string letter by letter on the computer (assumes US-style
  // keyboard)
  http://DigiKeyboard.println("Hello Digispark!");
 
  // It's better to use DigiKeyboard.delay() over the regular Arduino delay()
  // if doing keyboard stuff because it keeps talking to the computer to make
  // sure the computer knows the keyboard is alive and connected
  DigiKeyboard.delay(5000);

  DigiKeyboard.sendKeyStroke(0);
  DigiKeyboard.delay(5000);
  DigiKeyboard.sendKeyStroke(0, MOD_GUI_LEFT);
  DigiKeyboard.delay(1000);
  DigiKeyboard.print("cmd");
  DigiKeyboard.delay(1000);
  DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_CONTROL_LEFT | MOD_SHIFT_LEFT);
  DigiKeyboard.delay(1000);
  DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
  DigiKeyboard.sendKeyStroke(KEY_ENTER);
  DigiKeyboard.print("cmd");
  DigiKeyboard.print("cd\\");
  DigiKeyboard.print("tree");
  exit;
}
//exit;







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Code:
#include "DigiKeyboard.h"

void setup() {
  // don't need to set anything up to use DigiKeyboard
}


void loop() {
  // this is generally not necessary but with some older systems it seems to
  // prevent missing the first character after a delay:
  DigiKeyboard.sendKeyStroke(0);
 
  // Type out this string letter by letter on the computer (assumes US-style
  // keyboard)
  DigiKeyboard.println("Hello Digispark!");
 
  // It's better to use DigiKeyboard.delay() over the regular Arduino delay()
  // if doing keyboard stuff because it keeps talking to the computer to make
  // sure the computer knows the keyboard is alive and connected
  DigiKeyboard.delay(5000);
}


Last edited by jamied_uk on 30th March 2017, 17:59; edited 1 time in total
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

DigiSpark USB Device Project Empty Re: DigiSpark USB Device Project

Post by jamied_uk 30th March 2017, 17:29

Download All Project |Files & Links


Box Code:

app.box.com/s/tu39xtxwwvp9uya629i667vtip2c5fiv

https://app.box.com/s/tu39xtxwwvp9uya629i667vtip2c5fiv
jamied_uk
jamied_uk
Admin

Posts : 2950
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum