adriengibrat/torrent-rw — pull request #17 by wagaf-d (2013-09-01 09:04:08+00:00)
Title: More files accepted as torrents by is_torrent().

Some torrents files observed online start with "d13:creation date". Some files starting with "d9:\0*\0errorsle8:announce" where also observed.

This commit adds these cases to is_torrent(). To avoid problems with binary 0s, only the 3 first bytes "d9:" are compared for the last case. Files with binary zeros in the first 11 bytes are now accepted as torrents but still cause bugs in other places.