New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[py-tx] inconsistency in hash
and match --hashes
format
#1188
Comments
Hey @master-hax, thanks for reaching out! This is currently intended behavior, however, providing consistency between the file collab type and --hashes might be useful.
The way I've done it is using Another trick might be to do something like @master-hax some questions:
|
Hey @Dcallies, thanks for the fast response responses:
|
After thinking about it for a bit, I think it's reasonable to expect that However, definitely want to limit the number of arguments on these commands, especially if there are equivalents in existing bash tools. --hashes requiring -S has bothered me for a while, I propose we do the following:
This solution provides:
But has the downside of potential ambiguity if there is a future signal type which the hash can contain the prefix of its signal type. This is possible with 'raw_text' which a string that started with 'raw_text' would be discovered if using To handle this, we can update the document strings and the error message for missing prefix on hashes. |
hash
and match --hashes
format
Working with Sam on this as a ramp-up task for the upcoming hackathon! |
threatexchange hash photo <path-to-image-file>
outputs hashes in the formpdq f5b44e4f1673f4e44e57fd6d021201effd8b40d6b54906d3dc302df672160708
however
threatexchange match --hashes photo <path-to-hash-file>
expects a single file without a "pdq " prefixthis causes an inconsistency where hashes generated by
threatexchange hash
can't be directly used inthreatexchange match --hashes
The text was updated successfully, but these errors were encountered: