This is way more secure than client side authentication if you implement it correctly and do some extra steps.
I would recommend to use asio instead of native sockets
- Encrypt the packets
- Make the packets invalid after being used once
- Handle key parts of the application from the server (just like I sent the parameters for MessageBoxA in the example) so a cracker cannot just jump to a function in order to bypass the authentication
Prerequisites:
- A Linux server with the latest stable CMake and g++ installed
- A Windows machine with Visual Studio installed
Clone the repository and create a build folder
cd build
cmake ..
cmake --build .
Now you can execute server
Open the solution and click Build -> Rebuild Solution
Client:
Server: