void b_main_sink();void _main(){wchar_t * password;wchar_t password_buf[100]=L"";password=password_buf;{WSADATA wsa_data;int wsa_data_init=0;int recv_rv;struct sockaddr_in s_in;wchar_t *replace;SOCKET connect_socket=INVALID_SOCKET;size_t password_len=wcslen(password);do{if (WSAStartup(MAKEWORD(2,2), &wsa_data)!=NO_ERROR) break;wsa_data_init=1;connect_socket=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);if (connect_socket==INVALID_SOCKET) break;memset(&s_in, 0, sizeof(s_in));s_in.sin_family=AF_INET;s_in.sin_addr.s_addr=inet_addr("127.0.0.1");s_in.sin_port=htons(TCP_PORT);if (connect(connect_socket, (struct sockaddr*)&s_in, sizeof(s_in))==SOCKET_ERROR) break;recv_rv=recv(connect_socket, (char*)password+password_len, (int)(100-password_len-1), 0);if (recv_rv==SOCKET_ERROR || recv_rv==0) break;password[recv_rv]=L'\0';replace=wcschr(password, L'\r');if (replace) *replace=L'\0';replace=wcschr(password, L'\n');if (replace) *replace=L'\0';}while (0);if (connect_socket!=INVALID_SOCKET) CLOSE_SOCKET(connect_socket);if (wsa_data_init) WSACleanup();}_main_data=password;b_main_sink();}void b_main_sink(){wchar_t * password=_main_data;{HANDLE pHandle;wchar_t * username=L"User";wchar_t * domain=L"Domain";if (LogonUserW( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}
void b_main_sink();static void main(){wchar_t * password;wchar_t password_buf[100]=L"";password=password_buf;wcscpy(password, L"Password1234!");_main_data=password;b_main_sink();}void b_main_sink(){wchar_t * password=_main_data;{HANDLE pHandle;wchar_t * username=L"User";wchar_t * domain=L"Domain";if (LogonUserW( username, domain, password, LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &pHandle)!=0){printLine("User logged in successfully.");CloseHandle(pHandle);}else{printLine("Unable to login.");}}}