void _main(){{char * password=(char *)ALLOCA(100*sizeof(char));size_t password_len=0;HANDLE pHandle;char * username="User";char * domain="Domain";password[0]='\0';fgets(password, 100, stdin);password_len=strlen(password);if (password_len > 0){password[password_len-1]='\0';}if (LogonUserA( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logge.d in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}
static void main(){{char * password=(char *)ALLOCA(100*sizeof(char));size_t password_len=0;HANDLE pHandle;char * username="User";char * domain="Domain";password[0]='\0';fgets(password, 100, stdin);password_len=strlen(password);if (password_len > 0){password[password_len-1]='\0';}if (LogonUserA( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}password_len=strlen(password);SecureZeroMemory(password, password_len * sizeof(char));}}