Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thoughts
New mode:
-m fffFile Fingerprint Finder: search by SHA2-256 hash!Example use:
Probably going to stick to SHA2-256 for now. Will add 512 later? SHA2-256 seems pretty standard and collisions shouldn't be an issue for quite some time. Performance still needs to be evaluated but I don't think I can avoid having to run it on all files. Maybe link to a vuln database to see if I can start scanning file systems for known malware. Could be interesting!
Caveat will always be that I skip files that cannot be read with current user permissions. I will not throw an error. This is by design. You should know your permissions and which files are going to be in scope.
Test on a decent amount of files
Some of the files in this directory are quite large so this "test" is not the best for speed but can be a good indicator of running sha256 on large files.
Out of the 48,588 files:
Here's the fff run using
timeTest on a large amount of files
Running this on a
$HOMEwith 240k+ files:Here is the result: