n0la/rcon

libbsd package on Debian is libbsd-dev

Kadigan opened this issue · 5 comments

You may want to include that in the readme - took me a short while to find this (made a bit more fun by the fact that there exists a libbsd0 as well).

n0la commented

Thanks, I updated the README to explain building better.

n0la commented

Using rand() without a proper seed is not recommended, as it will most likely be the same number within the same second. I do not approve of this patch.

Thanks for explanation, I've added random seeding to patch.

n0la commented

I am afraid it is still not good enough. Instances run at the same epoch second will generate the same id. This breaks in scripts that run rcon after one another rapidly, or when you send multiple commands in the same instance. This is the reason I used a proper RNG in the first place. I'd suggest to leave the arc4 call in there. Or properly seed rand by reading from urandom.