mandiant / capa

The FLARE team's open-source tool to identify capabilities in executable files.
https://mandiant.github.io/capa/
Apache License 2.0
4.14k stars 522 forks source link

use bytes.hex/bytes.fromhex instead of binascii #2119

Closed williballenthin closed 1 month ago

williballenthin commented 4 months ago

Unrelated to this PR, I think we can replace https://github.com/mandiant/capa/blob/960ee864b9daf116e3040b4bf06ce947158b04aa/capa/rules/__init__.py#L459 with:

b = bytes.fromhex(s)

https://docs.python.org/3/library/stdtypes.html#bytes.fromhex

Originally posted by @s-ff in https://github.com/mandiant/capa/pull/2080#pullrequestreview-2094924732