cryptohack / issues-tracker

Repository to file issues for bugs and feature requests about CryptoHack
1 stars 1 forks source link

Buffured TCP listener #10

Closed maelhos closed 3 months ago

maelhos commented 3 months ago

TCP Listener doesn't support buffering multiple requests

When dealing with challenges that require many "small" (meaning much smaller than the maximum buffer input of usually 1024 bytes) requests, we lose a lot of time compared to aggregating multiple requests (if the challenge allows it).

Since the listener receives by chunk, manually unpacking lines is required. In this PR, I suggest a simple modification to the listener to handle aggregated JSON requests. I added a double break to ensure full-exit on the Challenge's first exit set.

Further tests may be required to ensure no exploits can be achieved.

hyperreality commented 3 months ago

Thank you, the changes are now live on CH platform