mirror of https://github.com/MISP/PyMISP
Merge branch 'main' of github.com:misp/pymisp
commit
ea67c171f7
|
@ -2,11 +2,61 @@ Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
|
||||||
|
v2.4.169 (2023-03-10)
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Changes
|
||||||
|
~~~~~~~
|
||||||
|
- Bump version. [Raphaël Vinot]
|
||||||
|
- Bump templates. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Add local key in MISPTag. [Raphaël Vinot]
|
||||||
|
|
||||||
|
Related #947
|
||||||
|
- Use pytest for the tests. [Raphaël Vinot]
|
||||||
|
|
||||||
|
|
||||||
|
v2.4.168.1 (2023-02-28)
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
New
|
||||||
|
~~~
|
||||||
|
- [doc] added the Jupyter notebook used in a.7-rest-api-extensive-
|
||||||
|
restsearch. [Alexandre Dulaunoy]
|
||||||
|
|
||||||
|
Changes
|
||||||
|
~~~~~~~
|
||||||
|
- Bump changelog, version. [Raphaël Vinot]
|
||||||
|
- Bump templates, again. [Raphaël Vinot]
|
||||||
|
- Bump templates. [Raphaël Vinot]
|
||||||
|
- Bump deps, templates. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Properly handle missing parameter in CSV importer. [Raphaël Vinot]
|
||||||
|
|
||||||
|
Fix #931
|
||||||
|
- Undefined variable in event delegation. [Raphaël Vinot]
|
||||||
|
- Remove reference to old pydeep. [Raphaël Vinot]
|
||||||
|
|
||||||
|
Fix #914
|
||||||
|
|
||||||
|
|
||||||
v2.4.168 (2023-01-23)
|
v2.4.168 (2023-01-23)
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
- Bump changelog. [Raphaël Vinot]
|
||||||
- Bump version. [Raphaël Vinot]
|
- Bump version. [Raphaël Vinot]
|
||||||
- Bump deps. [Raphaël Vinot]
|
- Bump deps. [Raphaël Vinot]
|
||||||
- Bump deps. [Raphaël Vinot]
|
- Bump deps. [Raphaël Vinot]
|
||||||
|
|
|
@ -52,7 +52,7 @@ poetry install -E fileobjects -E openioc -E virustotal -E docs -E pdfexport
|
||||||
### Running the tests
|
### Running the tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry run nosetests-3.4 --with-coverage --cover-package=pymisp,tests --cover-tests tests/test_*.py
|
poetry run pytest --cov=pymisp tests/test_*.py
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have a MISP instance to test against, you can also run the live ones:
|
If you have a MISP instance to test against, you can also run the live ones:
|
||||||
|
@ -60,7 +60,7 @@ If you have a MISP instance to test against, you can also run the live ones:
|
||||||
**Note**: You need to update the key in `tests/testlive_comprehensive.py` to the automation key of your admin account.
|
**Note**: You need to update the key in `tests/testlive_comprehensive.py` to the automation key of your admin account.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry run nosetests-3.4 --with-coverage --cover-package=pymisp,tests --cover-tests tests/testlive_comprehensive.py
|
poetry run pytest --cov=pymisp tests/testlive_comprehensive.py
|
||||||
```
|
```
|
||||||
|
|
||||||
## Samples and how to use PyMISP
|
## Samples and how to use PyMISP
|
||||||
|
@ -124,7 +124,7 @@ logging.basicConfig(level=logging.DEBUG, filename="debug.log", filemode='w', for
|
||||||
```bash
|
```bash
|
||||||
# From poetry
|
# From poetry
|
||||||
|
|
||||||
nosetests-3.4 -s --with-coverage --cover-package=pymisp,tests --cover-tests tests/testlive_comprehensive.py:TestComprehensive.[test_name]
|
pytest --cov=pymisp tests/test_*.py tests/testlive_comprehensive.py:TestComprehensive.[test_name]
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
__version__ = '2.4.168'
|
__version__ = '2.4.169'
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
|
|
|
@ -367,7 +367,7 @@ class AbstractMISP(MutableMapping, MISPFileCache, metaclass=ABCMeta):
|
||||||
|
|
||||||
class MISPTag(AbstractMISP):
|
class MISPTag(AbstractMISP):
|
||||||
|
|
||||||
_fields_for_feed: set = {'name', 'colour', 'relationship_type'}
|
_fields_for_feed: set = {'name', 'colour', 'relationship_type', 'local'}
|
||||||
|
|
||||||
def __init__(self, **kwargs: Dict):
|
def __init__(self, **kwargs: Dict):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
@ -386,6 +386,8 @@ class MISPTag(AbstractMISP):
|
||||||
self.relationship_type = ''
|
self.relationship_type = ''
|
||||||
if not hasattr(self, 'colour'):
|
if not hasattr(self, 'colour'):
|
||||||
self.colour = '#ffffff'
|
self.colour = '#ffffff'
|
||||||
|
if not hasattr(self, 'local'):
|
||||||
|
self.local = False
|
||||||
|
|
||||||
def _to_feed(self, with_local: bool = True) -> Dict:
|
def _to_feed(self, with_local: bool = True) -> Dict:
|
||||||
if hasattr(self, 'exportable') and not self.exportable:
|
if hasattr(self, 'exportable') and not self.exportable:
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3d238ffc407563e2d81cfcb867f426ae4f0ae898
|
Subproject commit 1da4760dcc99502a2dd5da02cba212b42068fcb8
|
|
@ -214,6 +214,7 @@ class EMailObject(AbstractMISPObjectGenerator):
|
||||||
filename=attch.longFilename)
|
filename=attch.longFilename)
|
||||||
cur_attach = message.get_payload()[-1]
|
cur_attach = message.get_payload()[-1]
|
||||||
self._update_content_disp_properties(attch, cur_attach)
|
self._update_content_disp_properties(attch, cur_attach)
|
||||||
|
if _orig_boundry is not None:
|
||||||
message.set_boundary(_orig_boundry) # Set back original boundary
|
message.set_boundary(_orig_boundry) # Set back original boundary
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
@ -235,7 +236,7 @@ class EMailObject(AbstractMISPObjectGenerator):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def attachments(self) -> List[Tuple[str, BytesIO]]:
|
def attachments(self) -> List[Tuple[Optional[str], BytesIO]]:
|
||||||
to_return = []
|
to_return = []
|
||||||
try:
|
try:
|
||||||
for attachment in self.email.iter_attachments():
|
for attachment in self.email.iter_attachments():
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "pymisp"
|
name = "pymisp"
|
||||||
version = "2.4.168"
|
version = "2.4.169"
|
||||||
description = "Python API for MISP."
|
description = "Python API for MISP."
|
||||||
authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
|
authors = ["Raphaël Vinot <raphael.vinot@circl.lu>"]
|
||||||
license = "BSD-2-Clause"
|
license = "BSD-2-Clause"
|
||||||
|
@ -47,7 +47,7 @@ requests = "^2.28.2"
|
||||||
python-dateutil = "^2.8.2"
|
python-dateutil = "^2.8.2"
|
||||||
jsonschema = "^4.17.3"
|
jsonschema = "^4.17.3"
|
||||||
deprecated = "^1.2.13"
|
deprecated = "^1.2.13"
|
||||||
extract_msg = {version = "^0.39.1", optional = true}
|
extract_msg = {version = "^0.39.2", optional = true}
|
||||||
RTFDE = {version = "^0.0.2", optional = true}
|
RTFDE = {version = "^0.0.2", optional = true}
|
||||||
oletools = {version = "^0.60.1", optional = true}
|
oletools = {version = "^0.60.1", optional = true}
|
||||||
python-magic = {version = "^0.4.27", optional = true}
|
python-magic = {version = "^0.4.27", optional = true}
|
||||||
|
@ -74,12 +74,12 @@ brotli = ['urllib3']
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
requests-mock = "^1.10.0"
|
requests-mock = "^1.10.0"
|
||||||
mypy = "^1.0.1"
|
mypy = "^1.1.1"
|
||||||
ipython = "^8.10.0"
|
ipython = "^8.11.0"
|
||||||
jupyterlab = "^3.6.1"
|
jupyterlab = "^3.6.1"
|
||||||
types-requests = "^2.28.11.13"
|
types-requests = "^2.28.11.15"
|
||||||
types-python-dateutil = "^2.8.19.7"
|
types-python-dateutil = "^2.8.19.10"
|
||||||
types-redis = "^4.5.1.1"
|
types-redis = "^4.5.1.4"
|
||||||
types-Flask = "^1.1.6"
|
types-Flask = "^1.1.6"
|
||||||
pytest-cov = "^4.0.0"
|
pytest-cov = "^4.0.0"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue