pymisp 2.5.17__py3-none-any.whl → 2.5.17.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymisp might be problematic. Click here for more details.
- pymisp/tools/create_misp_object.py +5 -6
- pymisp/tools/elfobject.py +3 -3
- pymisp/tools/machoobject.py +3 -3
- pymisp/tools/peobject.py +3 -3
- {pymisp-2.5.17.dist-info → pymisp-2.5.17.1.dist-info}/METADATA +9 -8
- {pymisp-2.5.17.dist-info → pymisp-2.5.17.1.dist-info}/RECORD +8 -8
- {pymisp-2.5.17.dist-info → pymisp-2.5.17.1.dist-info}/WHEEL +1 -1
- {pymisp-2.5.17.dist-info → pymisp-2.5.17.1.dist-info/licenses}/LICENSE +0 -0
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import logging
|
|
6
6
|
|
|
7
7
|
from io import BytesIO
|
|
8
|
+
from pathlib import Path
|
|
8
9
|
from typing import Any, TYPE_CHECKING
|
|
9
10
|
|
|
10
11
|
from ..exceptions import MISPObjectException
|
|
@@ -35,7 +36,7 @@ class FileTypeNotImplemented(MISPObjectException):
|
|
|
35
36
|
pass
|
|
36
37
|
|
|
37
38
|
|
|
38
|
-
def make_binary_objects(filepath: str | None = None,
|
|
39
|
+
def make_binary_objects(filepath: str | Path | None = None,
|
|
39
40
|
pseudofile: BytesIO | bytes | None = None,
|
|
40
41
|
filename: str | None = None,
|
|
41
42
|
standalone: bool = True,
|
|
@@ -43,13 +44,11 @@ def make_binary_objects(filepath: str | None = None,
|
|
|
43
44
|
misp_file = FileObject(filepath=filepath, pseudofile=pseudofile, filename=filename,
|
|
44
45
|
standalone=standalone, default_attributes_parameters=default_attributes_parameters)
|
|
45
46
|
if HAS_LIEF and (filepath or pseudofile):
|
|
47
|
+
# Since lief 0.17, the parse method figures out what do to with the parameter itself.
|
|
46
48
|
if filepath:
|
|
47
|
-
lief_parsed = lief.parse(filepath
|
|
49
|
+
lief_parsed = lief.parse(filepath)
|
|
48
50
|
elif pseudofile:
|
|
49
|
-
|
|
50
|
-
lief_parsed = lief.parse(raw=pseudofile)
|
|
51
|
-
else: # BytesIO
|
|
52
|
-
lief_parsed = lief.parse(obj=pseudofile)
|
|
51
|
+
lief_parsed = lief.parse(pseudofile)
|
|
53
52
|
else:
|
|
54
53
|
logger.critical('You need either a filepath, or a pseudofile and a filename.')
|
|
55
54
|
lief_parsed = None
|
pymisp/tools/elfobject.py
CHANGED
|
@@ -49,11 +49,11 @@ class ELFObject(AbstractMISPObjectGenerator):
|
|
|
49
49
|
logger.warning("pydeep is missing, please install pymisp this way: pip install pymisp[fileobjects]")
|
|
50
50
|
if pseudofile:
|
|
51
51
|
if isinstance(pseudofile, BytesIO):
|
|
52
|
-
e = lief.ELF.parse(
|
|
52
|
+
e = lief.ELF.parse(pseudofile)
|
|
53
53
|
elif isinstance(pseudofile, bytes):
|
|
54
|
-
e = lief.ELF.parse(
|
|
54
|
+
e = lief.ELF.parse(pseudofile)
|
|
55
55
|
elif isinstance(pseudofile, list):
|
|
56
|
-
e = lief.ELF.parse(
|
|
56
|
+
e = lief.ELF.parse(pseudofile)
|
|
57
57
|
else:
|
|
58
58
|
raise InvalidMISPObject(f'Pseudo file can be BytesIO or bytes got {type(pseudofile)}')
|
|
59
59
|
if not e:
|
pymisp/tools/machoobject.py
CHANGED
|
@@ -51,11 +51,11 @@ class MachOObject(AbstractMISPObjectGenerator):
|
|
|
51
51
|
logger.warning("pydeep is missing, please install pymisp this way: pip install pymisp[fileobjects]")
|
|
52
52
|
if pseudofile:
|
|
53
53
|
if isinstance(pseudofile, BytesIO):
|
|
54
|
-
m = lief.MachO.parse(
|
|
54
|
+
m = lief.MachO.parse(pseudofile)
|
|
55
55
|
elif isinstance(pseudofile, bytes):
|
|
56
|
-
m = lief.MachO.parse(
|
|
56
|
+
m = lief.MachO.parse(pseudofile)
|
|
57
57
|
elif isinstance(pseudofile, list):
|
|
58
|
-
m = lief.MachO.parse(
|
|
58
|
+
m = lief.MachO.parse(pseudofile)
|
|
59
59
|
else:
|
|
60
60
|
raise InvalidMISPObject(f'Pseudo file can be BytesIO or bytes got {type(pseudofile)}')
|
|
61
61
|
if not m:
|
pymisp/tools/peobject.py
CHANGED
|
@@ -53,11 +53,11 @@ class PEObject(AbstractMISPObjectGenerator):
|
|
|
53
53
|
logger.warning("pydeep is missing, please install pymisp this way: pip install pymisp[fileobjects]")
|
|
54
54
|
if pseudofile:
|
|
55
55
|
if isinstance(pseudofile, BytesIO):
|
|
56
|
-
p = lief.PE.parse(
|
|
56
|
+
p = lief.PE.parse(pseudofile)
|
|
57
57
|
elif isinstance(pseudofile, bytes):
|
|
58
|
-
p = lief.PE.parse(
|
|
58
|
+
p = lief.PE.parse(pseudofile)
|
|
59
59
|
elif isinstance(pseudofile, list):
|
|
60
|
-
p = lief.PE.parse(
|
|
60
|
+
p = lief.PE.parse(pseudofile)
|
|
61
61
|
else:
|
|
62
62
|
raise InvalidMISPObject(f'Pseudo file can be BytesIO or bytes got {type(pseudofile)}')
|
|
63
63
|
if not p:
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pymisp
|
|
3
|
-
Version: 2.5.17
|
|
3
|
+
Version: 2.5.17.1
|
|
4
4
|
Summary: Python API for MISP.
|
|
5
|
-
License: BSD-2-Clause
|
|
5
|
+
License-Expression: BSD-2-Clause
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Raphaël Vinot
|
|
7
8
|
Author-email: raphael.vinot@circl.lu
|
|
8
9
|
Requires-Python: >=3.9.2,<4.0
|
|
@@ -11,13 +12,13 @@ Classifier: Environment :: Console
|
|
|
11
12
|
Classifier: Intended Audience :: Information Technology
|
|
12
13
|
Classifier: Intended Audience :: Science/Research
|
|
13
14
|
Classifier: Intended Audience :: Telecommunications Industry
|
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
15
15
|
Classifier: Operating System :: POSIX :: Linux
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
22
|
Classifier: Topic :: Internet
|
|
22
23
|
Classifier: Topic :: Security
|
|
23
24
|
Provides-Extra: brotli
|
|
@@ -29,11 +30,11 @@ Provides-Extra: pdfexport
|
|
|
29
30
|
Provides-Extra: url
|
|
30
31
|
Provides-Extra: virustotal
|
|
31
32
|
Requires-Dist: RTFDE (>=0.1.2.1) ; (python_version <= "3.9") and (extra == "email")
|
|
32
|
-
Requires-Dist: beautifulsoup4 (>=4.13.
|
|
33
|
+
Requires-Dist: beautifulsoup4 (>=4.13.5) ; extra == "openioc"
|
|
33
34
|
Requires-Dist: deprecated (>=1.2.18)
|
|
34
35
|
Requires-Dist: docutils (<0.22) ; (python_version >= "3.11") and (extra == "docs")
|
|
35
|
-
Requires-Dist: extract_msg (>=0.
|
|
36
|
-
Requires-Dist: lief (>=0.
|
|
36
|
+
Requires-Dist: extract_msg (>=0.55.0) ; extra == "email"
|
|
37
|
+
Requires-Dist: lief (>=0.17.0) ; extra == "fileobjects"
|
|
37
38
|
Requires-Dist: myst-parser (>=4.0.1) ; (python_version >= "3.11") and (extra == "docs")
|
|
38
39
|
Requires-Dist: oletools (>=0.60.2) ; extra == "email"
|
|
39
40
|
Requires-Dist: pydeep2 (>=0.5.1) ; extra == "fileobjects"
|
|
@@ -41,7 +42,7 @@ Requires-Dist: pyfaup (>=1.2) ; extra == "url"
|
|
|
41
42
|
Requires-Dist: python-dateutil (>=2.9.0.post0)
|
|
42
43
|
Requires-Dist: python-magic (>=0.4.27) ; extra == "fileobjects"
|
|
43
44
|
Requires-Dist: reportlab (>=4.4.3) ; extra == "pdfexport"
|
|
44
|
-
Requires-Dist: requests (>=2.32.
|
|
45
|
+
Requires-Dist: requests (>=2.32.5)
|
|
45
46
|
Requires-Dist: sphinx (>=8.2.3) ; (python_version >= "3.11") and (extra == "docs")
|
|
46
47
|
Requires-Dist: sphinx-autodoc-typehints (>=3.2.0) ; (python_version >= "3.11") and (extra == "docs")
|
|
47
48
|
Requires-Dist: urllib3 (>=2.5.0) ; extra == "brotli"
|
|
@@ -378,10 +378,10 @@ pymisp/tools/__init__.py,sha256=_KCihYo82e8G5cHV321ak2sgbao2GyFjf4sSTMiN_IM,2233
|
|
|
378
378
|
pymisp/tools/_psl_faup.py,sha256=JyK8RQm8DPWvNuoF4rQpiE0rBm-Az-sr38Kl46dmWcs,7034
|
|
379
379
|
pymisp/tools/abstractgenerator.py,sha256=x9dBMtAt8bcUGVqVAjVQ3Gf5hgnZScyyoMZ4wHSS09M,2745
|
|
380
380
|
pymisp/tools/asnobject.py,sha256=zWl29pdn7eu0g1YRAt609_aNSCp1R4BzLquVOlzkZ84,836
|
|
381
|
-
pymisp/tools/create_misp_object.py,sha256=
|
|
381
|
+
pymisp/tools/create_misp_object.py,sha256=yTACToGdy99Plumc4_HQtMCcRWyWSHkLDfC2RNGRmxs,2806
|
|
382
382
|
pymisp/tools/csvloader.py,sha256=d-Ox4KEehuXi9YxPE3hhf62etaj7D0pUHr5Qy4rPoqo,2588
|
|
383
383
|
pymisp/tools/domainipobject.py,sha256=2w1ckOWPZvp9EW6TOAguT1Kwov72K1jJuJLqgU1whoo,847
|
|
384
|
-
pymisp/tools/elfobject.py,sha256=
|
|
384
|
+
pymisp/tools/elfobject.py,sha256=JX080uLjbm4Oi1m4N9wD03C5HMrIQdeRMHniPzHtT2I,4948
|
|
385
385
|
pymisp/tools/emailobject.py,sha256=GjOj4MJ0IQsdStkfAk0pshxBe40OGn1_g0jTftym_0o,22500
|
|
386
386
|
pymisp/tools/ext_lookups.py,sha256=acRbOVQftw7XpbjDZDrrdYzDmLDU4HmhoW48Og3UfaY,1022
|
|
387
387
|
pymisp/tools/fail2banobject.py,sha256=VWxK8qWVL0AqO_YZSKmsOcaEnG_5j0jOok7OfEXWfMQ,740
|
|
@@ -391,11 +391,11 @@ pymisp/tools/genericgenerator.py,sha256=upQuQXlv8SF1juA3BHHWXF2bC0_g3-Vv6Q25K_ow
|
|
|
391
391
|
pymisp/tools/geolocationobject.py,sha256=069_d6kHKWeCiX9bGxVI7Ky3r26SVKRAFzJLmhmOc4A,852
|
|
392
392
|
pymisp/tools/git_vuln_finder_object.py,sha256=WTRUvUsXnG4hkmFMI3PBwQV8N7URkCPh8zPXnFexMhs,1278
|
|
393
393
|
pymisp/tools/load_warninglists.py,sha256=4ahczPmCDCbMS7Ab25NMOxeDBCj_3lVniJbH08PuAw8,1003
|
|
394
|
-
pymisp/tools/machoobject.py,sha256=
|
|
394
|
+
pymisp/tools/machoobject.py,sha256=q87LW3mm_WMpKe3r_Zw-3wwaYoIeNIgQkseDXguqwk8,4771
|
|
395
395
|
pymisp/tools/microblogobject.py,sha256=8_53_6M79VhfrJzR_itZ8HnPPclQwX9j0JdI9gMB2kg,6899
|
|
396
396
|
pymisp/tools/neo4j.py,sha256=3Jr2QlOTk8D-P5c1DefYDEP6IIgKNswlZA7F5FocHjU,2088
|
|
397
397
|
pymisp/tools/openioc.py,sha256=TwXcbUkWNzkZavmPoVXdZpjM_GcKB9bqLrw7o3xI24E,14458
|
|
398
|
-
pymisp/tools/peobject.py,sha256=
|
|
398
|
+
pymisp/tools/peobject.py,sha256=y7TAvv9CFS3ETDrVsXS7FTBxR3Izgrv3OUM9pcSxmgk,11773
|
|
399
399
|
pymisp/tools/reportlab_generator.py,sha256=njt0sP-WTWywQ2ieF7Qy5h-dk5FLA0P1i_HF9qhz_4I,76994
|
|
400
400
|
pymisp/tools/sbsignatureobject.py,sha256=aq5To8zcBJe7BHBRZzlqC9xG7N31Naem6yp6bGTOwrU,790
|
|
401
401
|
pymisp/tools/sshauthkeyobject.py,sha256=GEByZkdR7QN3KgE4GcDw3LYS_h-DrUw5cWAy6rMvA_Y,1284
|
|
@@ -403,7 +403,7 @@ pymisp/tools/update_objects.py,sha256=sp_XshzgtRjAU0Mqg8FgRTaokjVKLImyQ02xIcPSrH
|
|
|
403
403
|
pymisp/tools/urlobject.py,sha256=PIucy1356zaljUm1NbeKmEpHpAUK9yiK2lAugcMp2t8,2489
|
|
404
404
|
pymisp/tools/vehicleobject.py,sha256=bs7f4d47IBi2-VumssSM3HlqkH0viyHTLmIHQxe8Iz8,3687
|
|
405
405
|
pymisp/tools/vtreportobject.py,sha256=NsdYzgqm47dywYeW8UnWmEDeIsf07xZreD2iJzFm2wg,3217
|
|
406
|
-
pymisp-2.5.17.dist-info/
|
|
407
|
-
pymisp-2.5.17.dist-info/
|
|
408
|
-
pymisp-2.5.17.dist-info/
|
|
409
|
-
pymisp-2.5.17.dist-info/RECORD,,
|
|
406
|
+
pymisp-2.5.17.1.dist-info/METADATA,sha256=TiiskjaL3FyxVZoswCDGBwEblhFkM4AWwEe3BXouQy8,8916
|
|
407
|
+
pymisp-2.5.17.1.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
408
|
+
pymisp-2.5.17.1.dist-info/licenses/LICENSE,sha256=1oPSVvs96qLjbJVi3mPn0yvWs-6aoIF6BNXi6pVlFmY,1615
|
|
409
|
+
pymisp-2.5.17.1.dist-info/RECORD,,
|
|
File without changes
|