Skip to content
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] Implement "File" Content Type #1675

Open
Dcallies opened this issue Oct 30, 2024 · 0 comments
Open

[py-tx] Implement "File" Content Type #1675

Dcallies opened this issue Oct 30, 2024 · 0 comments
Labels
mlh Related to Major League Hacking Fellowship python-threatexchange Items related to the threatexchange python tool / library

Comments

@Dcallies
Copy link
Contributor

Implement a new ContentType called "file" which represents the contents of a file. Files always have string names.

This will eventually feed into something like this: #1065

The end goal is we want to provide for the library to figure out whether it's a file or a photo automatically, and route it to the right one.

# Should be detected as a image
$ tx hash file file.png
pdq facefacefacefacefacefacefacefacefaceface

# Should be detected as a video
$ tx hash file file.png
pdq facefacefacefacefacefacefacefacefaceface

To do this, break this up into segments

  1. Add a PR that adds FileContent, with a method that can map to whether it's PhotoContent or VideoContent based on file name. Add some tests
  2. Add PR that allows the hash command to accept file, and then determine which of the "actual" content types it should use. Add a unittest in the e2e test to demonstrate.
@Dcallies Dcallies converted this from a draft issue Oct 30, 2024
@Dcallies Dcallies added python-threatexchange Items related to the threatexchange python tool / library mlh Related to Major League Hacking Fellowship labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlh Related to Major League Hacking Fellowship python-threatexchange Items related to the threatexchange python tool / library
Projects
Status: No status
Development

No branches or pull requests

1 participant