diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/python-modules/telfhash | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/telfhash')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/telfhash/default.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch | 30 |
2 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/telfhash/default.nix b/nixpkgs/pkgs/development/python-modules/telfhash/default.nix index a7aca8866ed7..ddb265bf033a 100644 --- a/nixpkgs/pkgs/development/python-modules/telfhash/default.nix +++ b/nixpkgs/pkgs/development/python-modules/telfhash/default.nix @@ -17,6 +17,8 @@ buildPythonPackage { sha256 = "jNu6qm8Q/UyJVaCqwFOPX02xAR5DwvCK3PaH6Fvmakk="; }; + patches = [ ./telfhash-new-tlsh-hash.patch ]; + # The tlsh library's name is just "tlsh" postPatch = '' substituteInPlace requirements.txt --replace "python-tlsh" "tlsh" diff --git a/nixpkgs/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch b/nixpkgs/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch new file mode 100644 index 000000000000..3984a4c1e810 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/telfhash/telfhash-new-tlsh-hash.patch @@ -0,0 +1,30 @@ +diff --git a/telfhash/grouping.py b/telfhash/grouping.py +index c62f8d9..4ee9f0b 100644 +--- a/telfhash/grouping.py ++++ b/telfhash/grouping.py +@@ -32,10 +32,10 @@ import tlsh + def get_combination(telfhash_data): + + # +- # TLSH hash is 70 characters long. if the telfhash is not 70 ++ # The new TLSH hash is 72 characters long. if the telfhash is not 72 + # characters in length, exclude from the list + # +- files_list = [x for x in list(telfhash_data.keys()) if telfhash_data[x]["telfhash"] is not None and len(telfhash_data[x]["telfhash"]) == 70] ++ files_list = [x for x in list(telfhash_data.keys()) if telfhash_data[x]["telfhash"] is not None and len(telfhash_data[x]["telfhash"]) == 72] + + # + # get the combination of all the possible pairs of filenames +diff --git a/telfhash/telfhash.py b/telfhash/telfhash.py +index f2bbd25..c6e346c 100755 +--- a/telfhash/telfhash.py ++++ b/telfhash/telfhash.py +@@ -132,7 +132,7 @@ def get_hash(symbols_list): + symbol_string = ",".join(symbols_list) + encoded_symbol_string = symbol_string.encode("ascii") + +- return tlsh.forcehash(encoded_symbol_string).lower() ++ return tlsh.forcehash(encoded_symbol_string) + + + def elf_get_imagebase(elf): |