knipknap / exscript

A Python module making Telnet and SSH easy
MIT License
364 stars 136 forks source link

Fixes issue #191 #231

Open Mir-ina opened 11 months ago

Mir-ina commented 11 months ago

If c is zero, then c.bit_length() is zero too. So c.to_bytes((c.bit_length()+7)//8, 'big') will return empty string, which is not correct. We need '\x00'.