hackergame-challenge-docker
hackergame-challenge-docker copied to clipboard
nc 类题目的 Docker 容器资源限制、动态 flag、网页终端
https://github.com/USTC-Hackergame/hackergame-challenge-docker/blob/4ac2211085689d6dd849d7bc39b427e2548efd12/dynamic_flag/front.py#L135 > If `--memory-swap` is explicitly set to `-1`, the container is allowed to use unlimited swap, up to the amount available on the host system. `cpus`是否也應當讓出題者或維護者可以設置?部分題目設爲0.5甚至0.25都可以。如果是8核,那八個人同時攪屎就能佔滿cpu。 另外, https://github.com/USTC-Hackergame/hackergame-challenge-docker/blob/4ac2211085689d6dd849d7bc39b427e2548efd12/dynamic_flag/front.py#L134 帶i不帶t是有什麼講究嗎
将 token 换成 libsodium 生成的签名(含消息明文)的十六进制表示。好处: - 避免和难用且危险的 openssl 打交道 - 不用搞无意义的 cert,只需要一对公私钥 - 不用手工拆解 id 和签名 - token 验证逻辑在其他语言中更易于实现,避免出错 - 避免选手因为 base64 字符问题被坑 - token 是确定性的,一个人只对应一个 token
By default, modern browsers might start devtools when users press Ctrl + Shift + C. This commit prevents this behavior and do the copy with execCommand.
If backend does not periodically ping client, nginx will close the socket after idling for 60s according to [proxy_read_timeout](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout).