static void main_sink(char * password){{HANDLE pHandle;char * username="User";char * domain="Domain";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.");}}}void _main(){char * password;void (*func_ptr) (char *)=main_sink;char password_buf[100]="";password=password_buf;{FILE *password_file;password_file=fopen("passwords.txt", "r");fgets(password, 100, password_file);fclose(password_file);}func_ptr(password);}
static void main_sink(char * password){{HANDLE pHandle;char * username="User";char * domain="Domain";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.");}}}static void main(){char * password;void (*func_ptr) (char *)=main_sink;char password_buf[100]="";password=password_buf;{size_t password_len=0;fgets(password, 100, stdin);password_len=strlen(password);if (password_len > 0){password[password_len-1]='\0';}}func_ptr(password);}