cryptoparser 0.9.1__tar.gz → 0.10.2__tar.gz

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.
Files changed (47) hide show
  1. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CHANGELOG.rst +72 -4
  2. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CryptoParser.egg-info/PKG-INFO +25 -3
  3. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CryptoParser.egg-info/SOURCES.txt +1 -1
  4. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CryptoParser.egg-info/requires.txt +3 -2
  5. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/PKG-INFO +25 -3
  6. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/README.rst +8 -1
  7. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/__setup__.py +1 -1
  8. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/base.py +7 -1
  9. CryptoParser-0.9.1/cryptoparser/httpx/parse.py → CryptoParser-0.10.2/cryptoparser/common/field.py +485 -277
  10. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/parse.py +61 -26
  11. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/httpx/header.py +105 -95
  12. CryptoParser-0.10.2/cryptoparser/httpx/parse.py +32 -0
  13. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/ssh/key.py +91 -91
  14. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/requirements.txt +3 -2
  15. CryptoParser-0.9.1/cryptoparser/common/key.py +0 -42
  16. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CONTRIBUTING.rst +0 -0
  17. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CryptoParser.egg-info/dependency_links.txt +0 -0
  18. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/CryptoParser.egg-info/top_level.txt +0 -0
  19. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/LICENSE.txt +0 -0
  20. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/MANIFEST.in +0 -0
  21. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/__init__.py +0 -0
  22. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/__init__.py +0 -0
  23. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/classes.py +0 -0
  24. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/exception.py +0 -0
  25. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/utils.py +0 -0
  26. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/common/x509.py +0 -0
  27. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/httpx/__init__.py +0 -0
  28. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/httpx/version.py +0 -0
  29. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/ssh/__init__.py +0 -0
  30. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/ssh/record.py +0 -0
  31. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/ssh/subprotocol.py +0 -0
  32. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/ssh/version.py +0 -0
  33. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/__init__.py +0 -0
  34. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/algorithm.py +0 -0
  35. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/ciphersuite.py +0 -0
  36. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/extension.py +0 -0
  37. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/grease.py +0 -0
  38. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/ldap.py +0 -0
  39. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/mysql.py +0 -0
  40. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/openvpn.py +0 -0
  41. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/postgresql.py +0 -0
  42. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/rdp.py +0 -0
  43. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/record.py +0 -0
  44. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/subprotocol.py +0 -0
  45. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/cryptoparser/tls/version.py +0 -0
  46. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/setup.cfg +0 -0
  47. {CryptoParser-0.9.1 → CryptoParser-0.10.2}/setup.py +0 -0
@@ -1,9 +1,53 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.10.2 - 2023-08-28
5
+ -------------------
6
+
7
+ Features
8
+ ~~~~~~~~
9
+
10
+ - DNS
11
+
12
+ - add parser for e-mail authentication and reporting related records (#74, #35, #36, #37, #38)
13
+
14
+ - `mail exchange <https://www.rfc-editor.org/rfc/rfc1035>`__ (MX)
15
+ - `Domain-based Message Authentication, Reporting, and Conformance <https://www.rfc-editor.org/rfc/rfc7489>`__
16
+ (DMARC)
17
+ - `Sender Policy Framework <https://www.rfc-editor.org/rfc/rfc7208>`__ (SPF)
18
+ - `SMTP MTA Strict Transport Security <https://www.rfc-editor.org/rfc/rfc8461>`__ (MTA-STS)
19
+ - `SMTP TLS Reporting <https://www.rfc-editor.org/rfc/rfc8460>`__ (TLSRPT)
20
+
21
+ 0.10.1 - 2023-08-29
22
+ -------------------
23
+
24
+ Features
25
+ ~~~~~~~~
26
+
27
+ - DNS
28
+
29
+ - add parser for DNSSEC-related records (#72)
30
+
31
+ - `DNSKEY <https://www.rfc-editor.org/rfc/rfc4034#section-2>`__
32
+ - `DS <https://www.rfc-editor.org/rfc/rfc4034#section-5>`__
33
+ - `RRSIG <https://www.rfc-editor.org/rfc/rfc4034#section-3>`__
34
+
35
+ 0.10.0 - 2023-08-03
36
+ -------------------
37
+
38
+ Notable fixes
39
+ ~~~~~~~~~~~~~
40
+
41
+ - Generic
42
+
43
+ - Markdown output of attr-based classes
44
+
4
45
  0.9.1 - 2022-06-22
5
46
  ------------------
6
47
 
48
+ Features
49
+ ~~~~~~~~
50
+
7
51
  - TLS (``tls``)
8
52
 
9
53
  - Generic
@@ -14,6 +58,9 @@ Changelog
14
58
  0.9.0 - 2023-04-29
15
59
  ------------------
16
60
 
61
+ Features
62
+ ~~~~~~~~
63
+
17
64
  - TLS (``tls``)
18
65
 
19
66
  - Generic
@@ -23,13 +70,19 @@ Changelog
23
70
  0.8.5 - 2023-04-02
24
71
  ------------------
25
72
 
26
- - Generic
73
+ Features
74
+ ~~~~~~~~
27
75
 
28
- - move data classes to `CryptoDataHub repository <https://gitlab.com/coroner/cryptodatahub>`__ (#67)
76
+ - Generic
77
+
78
+ - move data classes to `CryptoDataHub repository <https://gitlab.com/coroner/cryptodatahub>`__ (#67)
29
79
 
30
80
  0.8.4 - 2023-01-22
31
81
  ------------------
32
82
 
83
+ Features
84
+ ~~~~~~~~
85
+
33
86
  - TLS (``tls``)
34
87
 
35
88
  - Generic
@@ -39,6 +92,9 @@ Changelog
39
92
  0.8.2 - 2022-10-10
40
93
  ------------------
41
94
 
95
+ Features
96
+ ~~~~~~~~
97
+
42
98
  - TLS (``tls``)
43
99
 
44
100
  - Cipher Suites (``ciphers``)
@@ -57,6 +113,9 @@ Changelog
57
113
  0.8.0 - 2022-01-18
58
114
  ------------------
59
115
 
116
+ Features
117
+ ~~~~~~~~
118
+
60
119
  - SSH (``ssh``)
61
120
 
62
121
  - Public Keys (``pubkeys``)
@@ -70,6 +129,9 @@ Changelog
70
129
  0.7.3 - 2021-12-26
71
130
  ------------------
72
131
 
132
+ Notable fixes
133
+ ~~~~~~~~~~~~~
134
+
73
135
  - Generic
74
136
 
75
137
  - Fix time zone handlind in datetime parser
@@ -86,6 +148,9 @@ Other
86
148
  0.7.1 - 2021-09-20
87
149
  ------------------
88
150
 
151
+ Features
152
+ ~~~~~~~~
153
+
89
154
  - TLS (``tls``)
90
155
 
91
156
  - protocol item classes for PostgreSQL support (#44)
@@ -93,6 +158,9 @@ Other
93
158
  0.7.0 - 2021-09-02
94
159
  ------------------
95
160
 
161
+ Features
162
+ ~~~~~~~~
163
+
96
164
  - TLS (``tls``)
97
165
 
98
166
  - Extensions (``extensions``)
@@ -262,8 +330,8 @@ Features
262
330
  - `JA3 fingerprint <https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967>`__
263
331
  calculation for TLS client hello (#2)
264
332
 
265
- Bugs
266
- ^^^^
333
+ Notable fixes
334
+ ~~~~~~~~~~~~~
267
335
 
268
336
  - TLS (``tls``)
269
337
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CryptoParser
3
- Version: 0.9.1
3
+ Version: 0.10.2
4
4
  Summary: Fast and flexible security protocol parser and generator
5
5
  Author: Szilárd Pfeiffer
6
6
  Author-email: coroner@pfeifferszilard.hu
@@ -45,10 +45,25 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
45
45
  Classifier: Topic :: Software Development :: Testing :: Traffic Generation
46
46
  Classifier: Topic :: Software Development :: Testing
47
47
  Description-Content-Type: text/x-rst
48
+ License-File: LICENSE.txt
49
+ Requires-Dist: asn1crypto
50
+ Requires-Dist: attrs<22.0.1,>=20.3.0
51
+ Requires-Dist: cryptodatahub>=0.10.0
52
+ Requires-Dist: python-dateutil
53
+ Requires-Dist: py2-ipaddress; python_version < "3.4"
54
+ Requires-Dist: typing; python_version < "3.5"
55
+ Requires-Dist: python-dateutil
56
+ Requires-Dist: urllib3
57
+ Requires-Dist: enum34==1.1.6; python_version < "3"
58
+ Requires-Dist: pathlib2==2.3.7.post1; python_version < "3"
59
+ Requires-Dist: Mock; python_version < "3"
60
+ Requires-Dist: unittest2; python_version < "3"
48
61
  Provides-Extra: test
62
+ Requires-Dist: coverage; extra == "test"
49
63
  Provides-Extra: pep8
64
+ Requires-Dist: flake8; extra == "pep8"
50
65
  Provides-Extra: pylint
51
- License-File: LICENSE.txt
66
+ Requires-Dist: pylint; extra == "pylint"
52
67
 
53
68
  **CryptoParser** is a cryptographic protocol (TLS, SSH) and security-related protocol piece (HTTP headers) parser. It
54
69
  is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support
@@ -81,10 +96,17 @@ Operating systems
81
96
  - macOS
82
97
  - Windows
83
98
 
99
+ Documentation
100
+ -------------
101
+
102
+ Detailed `documentation <https://cryptoparser.readthedocs.io>`__ is available on the project's
103
+ `Read the Docs <https://readthedocs.com>`__ site.
104
+
84
105
  License
85
106
  -------
86
107
 
87
- The code is available under the terms of Mozilla Public License Version 2.0 (MPL 2.0).
108
+ The `code <https://gitlab.com/coroner/cryptoparser>`__ is available under the terms of
109
+ `Mozilla Public License Version 2.0 <https://www.mozilla.org/en-US/MPL/2.0/>`__ (MPL 2.0).
88
110
 
89
111
  A non-comprehensive, but straightforward description of MPL 2.0 can be found at
90
112
  `Choose an open source license <https://choosealicense.com/licenses#mpl-2.0>`__ website.
@@ -16,7 +16,7 @@ cryptoparser/common/__init__.py
16
16
  cryptoparser/common/base.py
17
17
  cryptoparser/common/classes.py
18
18
  cryptoparser/common/exception.py
19
- cryptoparser/common/key.py
19
+ cryptoparser/common/field.py
20
20
  cryptoparser/common/parse.py
21
21
  cryptoparser/common/utils.py
22
22
  cryptoparser/common/x509.py
@@ -1,8 +1,9 @@
1
1
  asn1crypto
2
- attrs<22.0.1,>=19.1
3
- cryptodatahub>=0.9.1
2
+ attrs<22.0.1,>=20.3.0
3
+ cryptodatahub>=0.10.0
4
4
  python-dateutil
5
5
  python-dateutil
6
+ urllib3
6
7
 
7
8
  [:python_version < "3.4"]
8
9
  py2-ipaddress
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: CryptoParser
3
- Version: 0.9.1
3
+ Version: 0.10.2
4
4
  Summary: Fast and flexible security protocol parser and generator
5
5
  Author: Szilárd Pfeiffer
6
6
  Author-email: coroner@pfeifferszilard.hu
@@ -45,10 +45,25 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
45
45
  Classifier: Topic :: Software Development :: Testing :: Traffic Generation
46
46
  Classifier: Topic :: Software Development :: Testing
47
47
  Description-Content-Type: text/x-rst
48
+ License-File: LICENSE.txt
49
+ Requires-Dist: asn1crypto
50
+ Requires-Dist: attrs<22.0.1,>=20.3.0
51
+ Requires-Dist: cryptodatahub>=0.10.0
52
+ Requires-Dist: python-dateutil
53
+ Requires-Dist: py2-ipaddress; python_version < "3.4"
54
+ Requires-Dist: typing; python_version < "3.5"
55
+ Requires-Dist: python-dateutil
56
+ Requires-Dist: urllib3
57
+ Requires-Dist: enum34==1.1.6; python_version < "3"
58
+ Requires-Dist: pathlib2==2.3.7.post1; python_version < "3"
59
+ Requires-Dist: Mock; python_version < "3"
60
+ Requires-Dist: unittest2; python_version < "3"
48
61
  Provides-Extra: test
62
+ Requires-Dist: coverage; extra == "test"
49
63
  Provides-Extra: pep8
64
+ Requires-Dist: flake8; extra == "pep8"
50
65
  Provides-Extra: pylint
51
- License-File: LICENSE.txt
66
+ Requires-Dist: pylint; extra == "pylint"
52
67
 
53
68
  **CryptoParser** is a cryptographic protocol (TLS, SSH) and security-related protocol piece (HTTP headers) parser. It
54
69
  is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support
@@ -81,10 +96,17 @@ Operating systems
81
96
  - macOS
82
97
  - Windows
83
98
 
99
+ Documentation
100
+ -------------
101
+
102
+ Detailed `documentation <https://cryptoparser.readthedocs.io>`__ is available on the project's
103
+ `Read the Docs <https://readthedocs.com>`__ site.
104
+
84
105
  License
85
106
  -------
86
107
 
87
- The code is available under the terms of Mozilla Public License Version 2.0 (MPL 2.0).
108
+ The `code <https://gitlab.com/coroner/cryptoparser>`__ is available under the terms of
109
+ `Mozilla Public License Version 2.0 <https://www.mozilla.org/en-US/MPL/2.0/>`__ (MPL 2.0).
88
110
 
89
111
  A non-comprehensive, but straightforward description of MPL 2.0 can be found at
90
112
  `Choose an open source license <https://choosealicense.com/licenses#mpl-2.0>`__ website.
@@ -29,10 +29,17 @@ Operating systems
29
29
  - macOS
30
30
  - Windows
31
31
 
32
+ Documentation
33
+ -------------
34
+
35
+ Detailed `documentation <https://cryptoparser.readthedocs.io>`__ is available on the project's
36
+ `Read the Docs <https://readthedocs.com>`__ site.
37
+
32
38
  License
33
39
  -------
34
40
 
35
- The code is available under the terms of Mozilla Public License Version 2.0 (MPL 2.0).
41
+ The `code <https://gitlab.com/coroner/cryptoparser>`__ is available under the terms of
42
+ `Mozilla Public License Version 2.0 <https://www.mozilla.org/en-US/MPL/2.0/>`__ (MPL 2.0).
36
43
 
37
44
  A non-comprehensive, but straightforward description of MPL 2.0 can be found at
38
45
  `Choose an open source license <https://choosealicense.com/licenses#mpl-2.0>`__ website.
@@ -2,7 +2,7 @@
2
2
 
3
3
  __title__ = 'CryptoParser'
4
4
  __technical_name__ = __title__.lower()
5
- __version__ = '0.9.1'
5
+ __version__ = '0.10.2'
6
6
  __description__ = 'Fast and flexible security protocol parser and generator'
7
7
  __author__ = 'Szilárd Pfeiffer'
8
8
  __author_email__ = 'coroner@pfeifferszilard.hu'
@@ -6,6 +6,8 @@ import json
6
6
  import math
7
7
  import types
8
8
 
9
+ import ipaddress
10
+
9
11
  try:
10
12
  from collections.abc import MutableSequence # only works on python 3.3+
11
13
  except ImportError: # pragma: no cover
@@ -196,7 +198,7 @@ class Serializable(object): # pylint: disable=too-few-public-methods
196
198
  return not isinstance(obj, enum.Enum) and isinstance(obj, six.string_types + six.integer_types + (float, ))
197
199
 
198
200
  @classmethod
199
- def _markdown_result(cls, obj, level=0):
201
+ def _markdown_result(cls, obj, level=0): # pylint: disable=too-many-branches
200
202
  if obj is None:
201
203
  result = False, 'n/a'
202
204
  elif isinstance(obj, bool):
@@ -212,6 +214,10 @@ class Serializable(object): # pylint: disable=too-few-public-methods
212
214
  return False, str(obj.value)
213
215
 
214
216
  return False, obj.name
217
+ elif isinstance(obj, (ipaddress.IPv4Network, ipaddress.IPv6Network)):
218
+ return False, str(obj)
219
+ elif attr.has(type(obj)):
220
+ result = cls._markdown_result_complex(obj, level)
215
221
  elif hasattr(obj, '_asdict'):
216
222
  result = cls._markdown_result(obj._asdict(), level)
217
223
  elif hasattr(obj, '__dict__') or isinstance(obj, dict):