Created
November 4, 2014 14:29
-
-
Save jonman364/74c425d7bd279d7a6531 to your computer and use it in GitHub Desktop.
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 <windows.h> | |
| int WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR cmdLn, int nShow){ | |
| char cmd[] = "nltest.exe /sc_change_pwd:DOMAIN"; // Change DOMAIN to domain name | |
| PROCESS_INFORMATION procInfo; | |
| STARTUPINFO startupInfo; | |
| ZeroMemory(&startupInfo, sizeof(startupInfo)); | |
| startupInfo.cb = sizeof(startupInfo); | |
| //chdir("%windir\\Sysnative"); | |
| Wow64DisableWow64FsRedirection(NULL); | |
| if(CreateProcess(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &startupInfo, &procInfo)){ | |
| WaitForSingleObject(procInfo.hProcess, INFINITE); | |
| CloseHandle(procInfo.hThread); | |
| CloseHandle(procInfo.hProcess); | |
| } | |
| return 0; | |
| } |
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
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
| <ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2"> | |
| <ms_asmv2:security> | |
| <ms_asmv2:requestedPrivileges> | |
| <ms_asmv2:requestedExecutionLevel level="requireAdministrator"> | |
| </ms_asmv2:requestedExecutionLevel> | |
| </ms_asmv2:requestedPrivileges> | |
| </ms_asmv2:security> | |
| </ms_asmv2:trustInfo> | |
| </assembly> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment