From a79c4ed9c20dfd3ddeaee93a3f7fc86f40446307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 8 May 2019 12:16:43 +0200 Subject: [PATCH] chg: Use pydeep from pypi, add test --- Pipfile | 1 - Pipfile.lock | 13 +++++++------ setup.py | 2 +- tests/testlive_comprehensive.py | 2 ++ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Pipfile b/Pipfile index 7a3ca8f..2539ea2 100644 --- a/Pipfile +++ b/Pipfile @@ -16,7 +16,6 @@ requests-mock = "*" [packages] pymisp = {editable = true,extras = ["fileobjects", "neo", "openioc", "virustotal", "pdfexport"],path = "."} -pydeep = {editable = true,git = "https://github.com/kbandla/pydeep.git"} pymispwarninglists = {editable = true,git = "https://github.com/MISP/PyMISPWarningLists.git"} lief = {version = "==0.9.0.dev0",index = "lief_index",markers = "python_version >= '3.5'"} diff --git a/Pipfile.lock b/Pipfile.lock index 1a0ab60..8f25501 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "46b6226f0c646fd9216d5a9b0d498bd1ebb68d9d39bc5ab26f6d6557ffe93984" + "sha256": "62cc8da79f6f7af6037a4b1a6d797070ae6e2dee6f46c7f81414ca63f3cd81f2" }, "pipfile-spec": 6, "requires": { @@ -177,9 +177,9 @@ }, "neobolt": { "hashes": [ - "sha256:225c11ae26cbcc723fdb51f3a3d2587e5a26b0792843457ec1b950fd84848b30" + "sha256:7be4852d6974c4c2a14ac32b4618074e6c6ee0b672a6029bf11d927358fcadfd" ], - "version": "==1.7.11" + "version": "==1.7.12" }, "neotime": { "hashes": [ @@ -239,9 +239,10 @@ "version": "==2.19" }, "pydeep": { - "editable": true, - "git": "https://github.com/kbandla/pydeep.git", - "ref": "bc0d33bff4b45718b4c5f2c79d4715d92a427eda" + "hashes": [ + "sha256:22866eb422d1d5907f8076ee792da65caecb172425d27576274e2a8eacf6afc1" + ], + "version": "==0.4" }, "pygments": { "hashes": [ diff --git a/setup.py b/setup.py index ab6e4aa..fe31f82 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ setup( install_requires=['six', 'requests', 'python-dateutil', 'jsonschema', 'python-dateutil', 'enum34;python_version<"3.4"', 'functools32;python_version<"3.0"'], - extras_require={'fileobjects': ['lief>=0.8', 'python-magic'], + extras_require={'fileobjects': ['lief>=0.8', 'python-magic', 'pydeep'], 'neo': ['py2neo'], 'openioc': ['beautifulsoup4'], 'virustotal': ['validators'], diff --git a/tests/testlive_comprehensive.py b/tests/testlive_comprehensive.py index 9759896..9106598 100644 --- a/tests/testlive_comprehensive.py +++ b/tests/testlive_comprehensive.py @@ -1008,6 +1008,8 @@ class TestComprehensive(unittest.TestCase): self.assertTrue('ObjectReference' in r, r) r = self.user_misp_connector.add_object(first.id, fo) + obj_attrs = r.get_attributes_by_relation('ssdeep') + self.assertEqual(len(obj_attrs), 1, obj_attrs) self.assertEqual(r.name, 'file', r) for ref in fo.ObjectReference: r = self.user_misp_connector.add_object_reference(ref)