chg: Bump deps

pull/849/head
Raphaël Vinot 2022-07-20 17:55:23 +02:00
parent 56a70265a0
commit 3882ade918
4 changed files with 468 additions and 508 deletions

937
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import TypeVar, Optional, Tuple, List, Dict, Union, Any, Mapping, Iterable
from typing import TypeVar, Optional, Tuple, List, Dict, Union, Any, Mapping, Iterable, MutableMapping
from datetime import date, datetime
import csv
from pathlib import Path
@ -152,8 +152,8 @@ class PyMISP:
:param timeout: Timeout, as described here: https://requests.readthedocs.io/en/master/user/advanced/#timeouts
"""
def __init__(self, url: str, key: str, ssl: bool = True, debug: bool = False, proxies: Mapping = {},
cert: Tuple[str, tuple] = None, auth: AuthBase = None, tool: str = '', timeout: Optional[Union[float, Tuple[float, float]]] = None):
def __init__(self, url: str, key: str, ssl: bool = True, debug: bool = False, proxies: Optional[MutableMapping[str, str]] = None,
cert: Optional[Union[str, Tuple[str, str]]] = None, auth: AuthBase = None, tool: str = '', timeout: Optional[Union[float, Tuple[float, float]]] = None):
if not url:
raise NoURL('Please provide the URL of your MISP instance.')
if not key:
@ -162,8 +162,8 @@ class PyMISP:
self.root_url: str = url
self.key: str = key
self.ssl: bool = ssl
self.proxies: Mapping[str, str] = proxies
self.cert: Optional[Tuple[str, tuple]] = cert
self.proxies: Optional[MutableMapping[str, str]] = proxies
self.cert: Optional[Union[str, Tuple[str, str]]] = cert
self.auth: Optional[AuthBase] = auth
self.tool: str = tool
self.timeout: Optional[Union[float, Tuple[float, float]]] = timeout

View File

@ -12,8 +12,8 @@ from io import BytesIO
from pathlib import Path
from typing import Union, List, Tuple, Dict, cast
from extract_msg import openMsg # type: ignore
from extract_msg.message import Message as MsgObj # type: ignore
from extract_msg import openMsg
from extract_msg.message import Message as MsgObj
from RTFDE.exceptions import MalformedEncapsulatedRtf, NotEncapsulatedRtf # type: ignore
from RTFDE.deencapsulate import DeEncapsulator # type: ignore
from oletools.common.codepages import codepage2codec # type: ignore
@ -104,7 +104,10 @@ class EMailObject(AbstractMISPObjectGenerator):
def _extract_msg_objects(self, msg_obj: MsgObj):
"""Extracts email objects needed to construct an eml from a msg."""
original_eml_header = msg_obj._getStringStream('__substg1.0_007D')
if original_eml_header:
message = email.message_from_string(original_eml_header, policy=policy.default)
else:
message = None
body = {}
if msg_obj.body is not None:
body['text'] = {"obj": msg_obj.body,

View File

@ -42,11 +42,11 @@ include = [
[tool.poetry.dependencies]
python = "^3.7"
requests = "^2.28.0"
requests = "^2.28.1"
python-dateutil = "^2.8.2"
jsonschema = "^4.6.0"
jsonschema = "^4.7.2"
deprecated = "^1.2.13"
extract_msg = {version = "^0.34.3", optional = true}
extract_msg = {version = "^0.36.1", optional = true}
RTFDE = {version = "^0.0.2", optional = true}
oletools = {version = "^0.60.1", optional = true}
python-magic = {version = "^0.4.27", optional = true}
@ -56,11 +56,11 @@ beautifulsoup4 = {version = "^4.11.1", optional = true}
validators = {version = "^0.20.0", optional = true}
sphinx-autodoc-typehints = {version = "^1.18.3", optional = true}
recommonmark = {version = "^0.7.1", optional = true}
reportlab = {version = "^3.6.10", optional = true}
reportlab = {version = "^3.6.11", optional = true}
pyfaup = {version = "^1.2", optional = true}
publicsuffixlist = {version = "^0.7.13", optional = true}
chardet = {version = "^4.0.0", optional = true}
urllib3 = {extras = ["brotli"], version = "^1.26.9", optional = true}
chardet = {version = "^5.0.0", optional = true}
urllib3 = {extras = ["brotli"], version = "^1.26.10", optional = true}
[tool.poetry.extras]
fileobjects = ['python-magic', 'pydeep2', 'lief']
@ -74,12 +74,12 @@ brotli = ['urllib3']
[tool.poetry.dev-dependencies]
requests-mock = "^1.9.3"
mypy = "^0.961"
mypy = "^0.971"
ipython = "^7.34.0"
jupyterlab = "^3.4.3"
types-requests = "^2.27.30"
types-python-dateutil = "^2.8.17"
types-redis = "^4.2.7"
types-requests = "^2.28.2"
types-python-dateutil = "^2.8.19"
types-redis = "^4.3.7"
types-Flask = "^1.1.6"
pytest-cov = "^3.0.0"