cdgriffith / puremagic

Pure python implementation of identifying files based off their magic numbers
MIT License
161 stars 34 forks source link

Increase legibility and provide full magic info in results #16

Closed dshunfen closed 5 years ago

dshunfen commented 5 years ago

I'm in the process of making a few enhancements to the puremagic lib. One thing I thought was really helpful about the library is that it just looks at the first bytes and provides a standard name. I found that using when the alternative libmagic, the file types are just a long concatenated string and can make analysis based on those values to be somewhat difficult.

This commit just makes some of the code more legible and makes the magic numbers available via the result from the API.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.1%) to 95.385% when pulling eea9f5705a937479393d8394eb18fb6939f0e6b7 on dshunfen:dshunfen/legibility_magic_num into 6d9de9a5e0ffb16a2a76911fbc58ad2aca3b8642 on cdgriffith:master.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.1%) to 95.385% when pulling eea9f5705a937479393d8394eb18fb6939f0e6b7 on dshunfen:dshunfen/legibility_magic_num into 6d9de9a5e0ffb16a2a76911fbc58ad2aca3b8642 on cdgriffith:master.

cdgriffith commented 5 years ago

Hey @dshunfen thank you so much for the contribution! Merging into develop now, so any others that you push please set that as the base.

I am going to fix the test issue and add you to the authors as well :)