pymisp 2.5.1__py3-none-any.whl → 2.5.2.dev0__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.

@@ -0,0 +1,41 @@
1
+ {
2
+ "attributes": {
3
+ "name": {
4
+ "description": "Name of the OpenTIDE Object",
5
+ "misp-attribute": "text",
6
+ "ui-priority": 0
7
+ },
8
+ "opentide-object": {
9
+ "description": "YAML Content of the Opentide Object",
10
+ "misp-attribute": "text",
11
+ "ui-priority": 3
12
+ },
13
+ "opentide-type": {
14
+ "description": "Type of the OpenTIDE Object",
15
+ "disable_correlation": true,
16
+ "misp-attribute": "text",
17
+ "multiple": false,
18
+ "ui-priority": 2,
19
+ "values_list": [
20
+ "tvm",
21
+ "cdm",
22
+ "mdr"
23
+ ]
24
+ },
25
+ "uuid": {
26
+ "description": "UUID of the OpenTIDE Object",
27
+ "misp-attribute": "text",
28
+ "ui-priority": 1
29
+ }
30
+ },
31
+ "description": "Object that is a container for threat or detection data, in accordance with the OpenTIDE Framework (https://code.europa.eu/ec-digit-s2/opentide)",
32
+ "meta-category": "misc",
33
+ "name": "opentide",
34
+ "required": [
35
+ "uuid",
36
+ "opentide-object",
37
+ "opentide-type"
38
+ ],
39
+ "uuid": "892fd46a-f69e-455c-8c4f-843a4b8f4295",
40
+ "version": 1
41
+ }
@@ -108,6 +108,12 @@
108
108
  ],
109
109
  "ui-priority": 10
110
110
  },
111
+ "ip-src": {
112
+ "description": "Source IP address used by this person.",
113
+ "misp-attribute": "ip-src",
114
+ "multiple": true,
115
+ "ui-priority": 10
116
+ },
111
117
  "last-name": {
112
118
  "description": "Last name of a natural person.",
113
119
  "misp-attribute": "last-name",
@@ -256,5 +262,5 @@
256
262
  "handle"
257
263
  ],
258
264
  "uuid": "a15b0477-e9d1-4b9c-9546-abe78a4f4248",
259
- "version": 20
265
+ "version": 21
260
266
  }
@@ -1900,7 +1900,14 @@
1900
1900
  ],
1901
1901
  "name": "summarized-by",
1902
1902
  "opposite": "summarizes"
1903
+ },
1904
+ {
1905
+ "description": "The source object is releasable to the target object.",
1906
+ "format": [
1907
+ "misp"
1908
+ ],
1909
+ "name": "releasable-to"
1903
1910
  }
1904
1911
  ],
1905
- "version": 49
1912
+ "version": 50
1906
1913
  }
@@ -151,6 +151,7 @@
151
151
  "mutex",
152
152
  "named pipe",
153
153
  "nationality",
154
+ "onion-address",
154
155
  "other",
155
156
  "passenger-name-record-locator-number",
156
157
  "passport-country",
pymisp/mispevent.py CHANGED
@@ -67,7 +67,7 @@ class AnalystDataBehaviorMixin(AbstractMISP):
67
67
  self.edited = True
68
68
  return the_note
69
69
 
70
- def add_opinion(self, opinion: int, comment: str | None = None, **kwargs) -> MISPNote: # type: ignore[no-untyped-def]
70
+ def add_opinion(self, opinion: int, comment: str | None = None, **kwargs) -> MISPOpinion: # type: ignore[no-untyped-def]
71
71
  the_opinion = MISPOpinion()
72
72
  the_opinion.from_dict(opinion=opinion, comment=comment,
73
73
  object_uuid=self.uuid, object_type=self.analyst_data_object_type,
@@ -76,7 +76,7 @@ class AnalystDataBehaviorMixin(AbstractMISP):
76
76
  self.edited = True
77
77
  return the_opinion
78
78
 
79
- def add_relationship(self, related_object_type: AbstractMISP | str, related_object_uuid: str | None, relationship_type: str, **kwargs) -> MISPNote: # type: ignore[no-untyped-def]
79
+ def add_relationship(self, related_object_type: AbstractMISP | str, related_object_uuid: str | None, relationship_type: str, **kwargs) -> MISPRelationship: # type: ignore[no-untyped-def]
80
80
  the_relationship = MISPRelationship()
81
81
  the_relationship.from_dict(related_object_type=related_object_type, related_object_uuid=related_object_uuid,
82
82
  relationship_type=relationship_type,
@@ -12,6 +12,8 @@ from pathlib import Path
12
12
  import sys
13
13
  import os
14
14
 
15
+ import requests
16
+
15
17
  if sys.version_info.major >= 3:
16
18
  from html import escape
17
19
  else:
@@ -410,10 +412,20 @@ def internationalize_font(config=None):
410
412
  NotoSansCJKtc - Medium.ttf
411
413
  '''
412
414
  font_path = Path(sys.modules['pymisp'].__file__).parent / 'tools' / 'pdf_fonts' / 'Noto_TTF'
413
-
414
415
  noto_bold = font_path / "NotoSansCJKtc-Bold.ttf"
415
416
  noto = font_path / "NotoSansCJKtc-DemiLight.ttf"
416
417
 
418
+ if not font_path.is_dir() or not noto_bold.is_file() or not noto.is_file():
419
+ font_path.mkdir(parents=True, exist_ok=True)
420
+ if not noto_bold.is_file():
421
+ bf = requests.get('https://github.com/MISP/pdf_fonts/raw/refs/heads/master/Noto_TTF/NotoSansCJKtc-Bold.ttf')
422
+ with open(noto_bold, 'wb') as f:
423
+ f.write(bf.content)
424
+ if not noto.is_file():
425
+ rf = requests.get('https://github.com/MISP/pdf_fonts/raw/refs/heads/master/Noto_TTF/NotoSansCJKtc-DemiLight.ttf')
426
+ with open(noto, 'wb') as f:
427
+ f.write(rf.content)
428
+
417
429
  if noto_bold.is_file() and noto.is_file():
418
430
  registerFont(TTFont("Noto", noto))
419
431
  registerFont(TTFont("Noto-bold", noto_bold))
@@ -421,7 +433,7 @@ def internationalize_font(config=None):
421
433
  FIRST_COL_FONT = 'Noto-bold'
422
434
  SECOND_COL_FONT = 'Noto'
423
435
  else:
424
- logger.error(f"Trying to load a custom (internationalization) font, unable to access the file: {noto_bold}")
436
+ logger.error(f"Trying to load a custom (internationalization) font, unable to access the file: {noto_bold} / {noto}")
425
437
 
426
438
 
427
439
  def get_table_styles():
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymisp
3
- Version: 2.5.1
3
+ Version: 2.5.2.dev0
4
4
  Summary: Python API for MISP.
5
5
  Home-page: https://github.com/MISP/PyMISP
6
6
  License: BSD-2-Clause
7
7
  Author: Raphaël Vinot
8
8
  Author-email: raphael.vinot@circl.lu
9
- Requires-Python: >=3.8,<4.0
9
+ Requires-Python: >=3.9,<4.0
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Information Technology
@@ -15,7 +15,6 @@ Classifier: Intended Audience :: Telecommunications Industry
15
15
  Classifier: License :: OSI Approved :: BSD License
16
16
  Classifier: Operating System :: POSIX :: Linux
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
@@ -36,10 +35,10 @@ Requires-Dist: Sphinx (>=8,<9) ; (python_version >= "3.10") and (extra == "docs"
36
35
  Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0) ; extra == "openioc"
37
36
  Requires-Dist: deprecated (>=1.2.14,<2.0.0)
38
37
  Requires-Dist: docutils (>=0.21.1,<0.22.0) ; (python_version >= "3.10") and (extra == "docs")
39
- Requires-Dist: extract_msg (>=0.51,<0.52) ; extra == "email"
38
+ Requires-Dist: extract_msg (>=0.52,<0.53) ; extra == "email"
40
39
  Requires-Dist: lief (>=0.15.0,<0.16.0) ; extra == "fileobjects"
41
40
  Requires-Dist: oletools (>=0.60.1,<0.61.0) ; extra == "email"
42
- Requires-Dist: publicsuffixlist (>=1.0.2.20241017,<2.0.0.0)
41
+ Requires-Dist: publicsuffixlist (>=1.0.2.20241108,<2.0.0.0)
43
42
  Requires-Dist: pydeep2 (>=0.5.1,<0.6.0) ; extra == "fileobjects"
44
43
  Requires-Dist: pyfaup (>=1.2,<2.0) ; extra == "url"
45
44
  Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
@@ -222,6 +222,7 @@ pymisp/data/misp-objects/objects/network-traffic/definition.json,sha256=jZSGhItw
222
222
  pymisp/data/misp-objects/objects/news-agency/definition.json,sha256=yo-x2a7rei3tFIwHEisW2Hf3cGAQieEAs1QRGOQjSYE,2090
223
223
  pymisp/data/misp-objects/objects/news-media/definition.json,sha256=Mb4TQz-Cj035HtfyuhVyRTCUlxkzCizBZghLxgD6rGA,4024
224
224
  pymisp/data/misp-objects/objects/open-data-security/definition.json,sha256=fNTNdk-Hjd83DkmhbhGst6PJv09ZJzuXC6RitsEinZg,3052
225
+ pymisp/data/misp-objects/objects/opentide/definition.json,sha256=vZi8fwy2yiEZ8aLV0UDodxLENeqZoaOMzafyelSYiQI,1056
225
226
  pymisp/data/misp-objects/objects/organization/definition.json,sha256=2Dq4Gs4ynlcaP1rnxfvDCU8cCARO39_Z3azkHYJjhh4,3956
226
227
  pymisp/data/misp-objects/objects/original-imported-file/definition.json,sha256=lip2yP3wdLoCGxsiCrNMcBC6nyQJUPcJFZYzlkpxeOA,921
227
228
  pymisp/data/misp-objects/objects/paloalto-threat-event/definition.json,sha256=F1qMo6LN32i3e7ODjv38twX3BEzrgdLIqXN9PqL-3x4,2597
@@ -237,7 +238,7 @@ pymisp/data/misp-objects/objects/pe/definition.json,sha256=ius7hv-oOLfoDHM1AIJam
237
238
  pymisp/data/misp-objects/objects/pe-optional-header/definition.json,sha256=Jf0P843lWZi4HNrUwPF70MT7IdzzWW6Omx4w588LXIA,8179
238
239
  pymisp/data/misp-objects/objects/pe-section/definition.json,sha256=aE0AI0DToNSHJ3f2KYrr0LskgB0yfwG7WtRDPcQJvnI,3395
239
240
  pymisp/data/misp-objects/objects/persnona/definition.json,sha256=74u9w7rXAT_O1DLmB5TGFTeZZvy_DShd6CVbTFhU8aM,3233
240
- pymisp/data/misp-objects/objects/person/definition.json,sha256=b3jGbgLFdgdUMNTn3jT_cKdybgD0sJE7j9ZfwrSjFK8,7481
241
+ pymisp/data/misp-objects/objects/person/definition.json,sha256=epv1bYSOLiLGmBvGzMiq9ZucaaBS9c_208CCYwL2Ljk,7649
241
242
  pymisp/data/misp-objects/objects/personification/definition.json,sha256=Bof5SuhKI0tix2GYcMb5rCnHD8z1iIryDcEzbc52o3Q,5613
242
243
  pymisp/data/misp-objects/objects/pgp-meta/definition.json,sha256=QS_BR8ZlKdtW3Y-tsLe6-SgXvsGxirIeuBW20MIK5LY,767
243
244
  pymisp/data/misp-objects/objects/phishing/definition.json,sha256=R-gbLQKZuR5cyomT2vQmtPUvHGaiepz5mqHCL4IUWVg,3370
@@ -367,8 +368,8 @@ pymisp/data/misp-objects/objects/youtube-channel/definition.json,sha256=R35mGTp8
367
368
  pymisp/data/misp-objects/objects/youtube-comment/definition.json,sha256=3cVid4QJB28CowczKiXb4s8-1Ald1MvehL7qUaBqIGI,2470
368
369
  pymisp/data/misp-objects/objects/youtube-playlist/definition.json,sha256=oDlL__sYqBVOJPJllxW4wW3ElUhz6cKM0UAruPO2BTw,1576
369
370
  pymisp/data/misp-objects/objects/youtube-video/definition.json,sha256=VQsamCqE-C3OIR-DFp8Rvn-gGxQ_k8hUTnqwyLkk1o4,2581
370
- pymisp/data/misp-objects/relationships/definition.json,sha256=3A0h_rhYl_A2pHuZbJm1B2bCUTHRC3t3gwRm9l0jNrw,47682
371
- pymisp/data/misp-objects/schema_objects.json,sha256=-Wo1qJlx64azOEMGh3RHyhZIXPuhKUrcR-8fUrcIyMc,8317
371
+ pymisp/data/misp-objects/relationships/definition.json,sha256=LbCK1DpKIGlzx2-ru_FTdYfj0cQhIfRASYM96J5o53Y,47845
372
+ pymisp/data/misp-objects/schema_objects.json,sha256=uwRHHv4mvNkg0A9Kdeb3Y80_IUhJglsIn-gN88Kh65g,8346
372
373
  pymisp/data/misp-objects/schema_relationships.json,sha256=MCusp9GAyuHTo3lLyBrsvl5WJC-OHjXYHlEHW6fNv8M,1181
373
374
  pymisp/data/misp-objects/tools/adoc_objects.py,sha256=Mv9pibT7-GCkj8WjBJf8Yo8iJ23zA2I8uqOYQODX1pI,7662
374
375
  pymisp/data/misp-objects/tools/alfred_links_to_relarelationships.py,sha256=_RnS-Dwdi1XruN45q7jGbdRee7mRR2k7oZrgqXtW-dM,1572
@@ -380,7 +381,7 @@ pymisp/data/misp-objects/validate_all.sh,sha256=0wWn-qZS9Pp0voEHK2QBCUxjvlaYj_kb
380
381
  pymisp/data/schema-lax.json,sha256=2QICdCbtfXRJkTVjwb7xjF3ypys2wOtrUyE1ZDz_qes,8561
381
382
  pymisp/data/schema.json,sha256=79N2hObemthb_syUHksDqM4djFttsWZQDg1sTYZYxys,9178
382
383
  pymisp/exceptions.py,sha256=IgGGadv5lnLAvO7Q6AjF0vEbjoWwwDWLYwMn-8pkU_k,1965
383
- pymisp/mispevent.py,sha256=WyLnXx3qLw7pry8-Tx6t0ICHFdsnMYrtjCnlx7jPaWE,116590
384
+ pymisp/mispevent.py,sha256=RF4KJ6-L5x7qLA9glQiQ1FhuYDyFNPu1GXmBRbxntQE,116601
384
385
  pymisp/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
385
386
  pymisp/tools/__init__.py,sha256=_KCihYo82e8G5cHV321ak2sgbao2GyFjf4sSTMiN_IM,2233
386
387
  pymisp/tools/_psl_faup.py,sha256=JyK8RQm8DPWvNuoF4rQpiE0rBm-Az-sr38Kl46dmWcs,7034
@@ -403,17 +404,15 @@ pymisp/tools/machoobject.py,sha256=tSyuWz6z_i-ChZ0uFVwxAh8LE2vW30L82SnoPDPuvWs,4
403
404
  pymisp/tools/microblogobject.py,sha256=8_53_6M79VhfrJzR_itZ8HnPPclQwX9j0JdI9gMB2kg,6899
404
405
  pymisp/tools/neo4j.py,sha256=3Jr2QlOTk8D-P5c1DefYDEP6IIgKNswlZA7F5FocHjU,2088
405
406
  pymisp/tools/openioc.py,sha256=TwXcbUkWNzkZavmPoVXdZpjM_GcKB9bqLrw7o3xI24E,14458
406
- pymisp/tools/pdf_fonts/.git,sha256=zi3lcpLK-wcPvV13acdJCBbH54ysSkhWkOwghJ4NpUA,53
407
- pymisp/tools/pdf_fonts/.gitignore,sha256=ouv-zbbBtYJn--l-birALCuWPfdnP8EEcnDw8M_xZzI,1203
408
407
  pymisp/tools/peobject.py,sha256=9XHvk4zpWsV1YvbI7YKQUrbnGrUuR21v86PE9z1Nxtg,11819
409
- pymisp/tools/reportlab_generator.py,sha256=oDq83pPIfollTOoyrOChM8G5BA9r3xDqh3AIA_h5G1U,76324
408
+ pymisp/tools/reportlab_generator.py,sha256=njt0sP-WTWywQ2ieF7Qy5h-dk5FLA0P1i_HF9qhz_4I,76994
410
409
  pymisp/tools/sbsignatureobject.py,sha256=aq5To8zcBJe7BHBRZzlqC9xG7N31Naem6yp6bGTOwrU,790
411
410
  pymisp/tools/sshauthkeyobject.py,sha256=GEByZkdR7QN3KgE4GcDw3LYS_h-DrUw5cWAy6rMvA_Y,1284
412
411
  pymisp/tools/update_objects.py,sha256=sp_XshzgtRjAU0Mqg8FgRTaokjVKLImyQ02xIcPSrHE,816
413
412
  pymisp/tools/urlobject.py,sha256=PIucy1356zaljUm1NbeKmEpHpAUK9yiK2lAugcMp2t8,2489
414
413
  pymisp/tools/vehicleobject.py,sha256=bs7f4d47IBi2-VumssSM3HlqkH0viyHTLmIHQxe8Iz8,3687
415
414
  pymisp/tools/vtreportobject.py,sha256=NsdYzgqm47dywYeW8UnWmEDeIsf07xZreD2iJzFm2wg,3217
416
- pymisp-2.5.1.dist-info/LICENSE,sha256=1oPSVvs96qLjbJVi3mPn0yvWs-6aoIF6BNXi6pVlFmY,1615
417
- pymisp-2.5.1.dist-info/METADATA,sha256=0Rg0D_bYuZ5WQFkOB2M7Pf2oHuMuUNvvdXONRwDkxHw,9216
418
- pymisp-2.5.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
419
- pymisp-2.5.1.dist-info/RECORD,,
415
+ pymisp-2.5.2.dev0.dist-info/LICENSE,sha256=1oPSVvs96qLjbJVi3mPn0yvWs-6aoIF6BNXi6pVlFmY,1615
416
+ pymisp-2.5.2.dev0.dist-info/METADATA,sha256=S57InEhb6BFzKrLGnKzA85uDMgNCmH6AxCF5mkt4RCg,9171
417
+ pymisp-2.5.2.dev0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
418
+ pymisp-2.5.2.dev0.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- gitdir: ../../../.git/modules/pymisp/tools/pdf_fonts
@@ -1,104 +0,0 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- *.egg-info/
24
- .installed.cfg
25
- *.egg
26
- MANIFEST
27
-
28
- # PyInstaller
29
- # Usually these files are written by a python script from a template
30
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
- *.manifest
32
- *.spec
33
-
34
- # Installer logs
35
- pip-log.txt
36
- pip-delete-this-directory.txt
37
-
38
- # Unit test / coverage reports
39
- htmlcov/
40
- .tox/
41
- .coverage
42
- .coverage.*
43
- .cache
44
- nosetests.xml
45
- coverage.xml
46
- *.cover
47
- .hypothesis/
48
- .pytest_cache/
49
-
50
- # Translations
51
- *.mo
52
- *.pot
53
-
54
- # Django stuff:
55
- *.log
56
- local_settings.py
57
- db.sqlite3
58
-
59
- # Flask stuff:
60
- instance/
61
- .webassets-cache
62
-
63
- # Scrapy stuff:
64
- .scrapy
65
-
66
- # Sphinx documentation
67
- docs/_build/
68
-
69
- # PyBuilder
70
- target/
71
-
72
- # Jupyter Notebook
73
- .ipynb_checkpoints
74
-
75
- # pyenv
76
- .python-version
77
-
78
- # celery beat schedule file
79
- celerybeat-schedule
80
-
81
- # SageMath parsed files
82
- *.sage.py
83
-
84
- # Environments
85
- .env
86
- .venv
87
- env/
88
- venv/
89
- ENV/
90
- env.bak/
91
- venv.bak/
92
-
93
- # Spyder project settings
94
- .spyderproject
95
- .spyproject
96
-
97
- # Rope project settings
98
- .ropeproject
99
-
100
- # mkdocs documentation
101
- /site
102
-
103
- # mypy
104
- .mypy_cache/