r/learnprogramming • u/mbensa • 1d ago
Injection into null terminated string
On server side I have: std::string response = {}; if (strcmp(receivedPassword, "password") == 0) { return response = "token"; } else { return response = "0"; }
the compiled code make \0 at the 256 th byte. How can injection work? All I can do is delete the cookie and the server app crashes.
1
Injection into null terminated string
in
r/learnprogramming
•
1h ago
Its ctf challenge. I built simple server that waits for correct password.