CaliDog / Axeman

Axeman is a utility to retrieve certificates from Certificate Transparency Lists (CTLs)
MIT License
218 stars 71 forks source link

-z (ctl_offset) messes up output unless value is exactly devidable by block_size #16

Open smiba opened 4 years ago

smiba commented 4 years ago

The use of the -z (ctl_offset) option will result in missing entries, or double entries if its not devidable by the block_size.

Having a non dividable amount will cause Axeman to send requests lager then block_size to the CT (resulting in less results then expected and other weird behaviour)

How to reproduce:

(Using argon2023 which has a blocksize of 32) Good looking output (128 / 32 = 4): axeman -z 128 -u ct.googleapis.com/logs/argon2023

Bad looking output (126 / 32 = ~3.94): axeman -z 126 -u ct.googleapis.com/logs/argon2023

In this example the bad looking output will be 32 block big files, with only 2 entries (and the other 30 not written)