cryptoparser 1.3.0__tar.gz → 1.5.0__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.
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/.gitignore +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/.gitlab-ci.yml +21 -15
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/.pylintrc +1 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CHANGELOG.rst +53 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CryptoParser.egg-info/PKG-INFO +5 -6
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CryptoParser.egg-info/SOURCES.txt +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CryptoParser.egg-info/requires.txt +1 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CryptoParser.egg-info/top_level.txt +2 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/PKG-INFO +5 -6
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/README.rst +3 -3
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/__setup__.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/base.py +7 -8
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/classes.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/exception.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/field.py +1 -2
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/parse.py +7 -8
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/utils.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/x509.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/dnsrec/record.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/dnsrec/txt.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/httpx/parse.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/httpx/version.py +0 -1
- cryptoparser-1.5.0/cryptoparser/ike/common.py +544 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ike/ikev1.py +353 -20
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ike/ikev2.py +790 -21
- cryptoparser-1.5.0/cryptoparser/ike/isakmp.py +290 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ssh/key.py +5 -6
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ssh/record.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ssh/subprotocol.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ssh/version.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/algorithm.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/ciphersuite.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/extension.py +19 -20
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/grease.py +1 -2
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/ldap.py +1 -2
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/mysql.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/openvpn.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/postgresql.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/rdp.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/record.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/subprotocol.py +7 -8
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/version.py +0 -1
- cryptoparser-1.5.0/cryptoparser.spec +89 -0
- cryptoparser-1.5.0/debian/changelog +50 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/debian/rules +1 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/docs/features.rst +8 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/pyproject.toml +7 -32
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/classes.py +10 -11
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_algorithm.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_base.py +3 -4
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_classes.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_exception.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_field.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_parse.py +2 -3
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_utils.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/test_x509.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/dnsrec/test_record.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/dnsrec/test_txt.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/httpx/classes.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/httpx/test_version.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/classes.py +68 -4
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/test_ikev1_payload.py +329 -38
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/test_ikev1_sa.py +0 -1
- cryptoparser-1.5.0/test/ike/test_ikev2_notify.py +673 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/test_ikev2_payload.py +520 -35
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/test_ikev2_sa.py +9 -10
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/test_isakmp.py +146 -10
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/test_version.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ssh/test_ciphersuites.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ssh/test_key.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ssh/test_record.py +1 -2
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ssh/test_subprotocol.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ssh/test_version.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/classes.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_alert.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_application_data.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_change_cipher_spec.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_ciphersuite.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_extension.py +1 -2
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_grease.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_handshake.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_ldap.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_mysql.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_openvpn.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_postgresql.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_rdp.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_record.py +0 -1
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/test_version.py +0 -1
- cryptoparser-1.3.0/.flake8 +0 -2
- cryptoparser-1.3.0/cryptoparser/ike/common.py +0 -236
- cryptoparser-1.3.0/cryptoparser/ike/isakmp.py +0 -201
- cryptoparser-1.3.0/cryptoparser.spec +0 -60
- cryptoparser-1.3.0/debian/changelog +0 -15
- cryptoparser-1.3.0/test/ike/test_ikev2_notify.py +0 -376
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/.coveragerc +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/.gitmodules +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/.readthedocs.yaml +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CONTRIBUTING.rst +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/CryptoParser.egg-info/dependency_links.txt +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/LICENSE.txt +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/MANIFEST.in +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/common/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/dnsrec/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/httpx/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/httpx/header.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ike/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ike/version.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/ssh/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/cryptoparser/tls/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/debian/control +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/debian/copyright +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/debian/source/format +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/debian/watch +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/docs/.gitignore +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/docs/changelog.rst +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/docs/conf.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/docs/development.rst +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/docs/index.rst +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/setup.cfg +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/setup.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/certs/ecc256.badssl.com.pem +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/certs/rsa8192.badssl.com.pem +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/certs/rsa8192.badssl.com_certificate.crt +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/certs/rsa8192.badssl.com_root_ca.crt +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/common/certs/snakeoil_cert.pem +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/dnsrec/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/httpx/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/httpx/test_header.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ike/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/ssh/__init__.py +0 -0
- {cryptoparser-1.3.0 → cryptoparser-1.5.0}/test/tls/__init__.py +0 -0
|
@@ -6,62 +6,70 @@ stages:
|
|
|
6
6
|
- deploy
|
|
7
7
|
|
|
8
8
|
before_script:
|
|
9
|
-
- pip install
|
|
9
|
+
- pip install uv
|
|
10
|
+
- uv pip install --system .[tests]
|
|
10
11
|
|
|
11
12
|
variables:
|
|
12
13
|
GIT_SUBMODULE_DEPTH: 1
|
|
13
14
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
14
15
|
PYTHONPATH: "submodules/cryptodatahub"
|
|
15
16
|
|
|
17
|
+
.test:
|
|
18
|
+
script:
|
|
19
|
+
- coverage run -m unittest discover -v
|
|
20
|
+
- coverage report
|
|
21
|
+
|
|
16
22
|
pylint:
|
|
17
23
|
image: python:3.14-slim
|
|
18
24
|
stage: earlytest
|
|
19
|
-
script:
|
|
25
|
+
script:
|
|
26
|
+
- uv pip install --system pylint
|
|
27
|
+
- pylint --rcfile .pylintrc cryptoparser docs test
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
ruff:
|
|
22
30
|
image: python:3.14-slim
|
|
23
31
|
stage: earlytest
|
|
24
|
-
script:
|
|
32
|
+
script: uvx ruff check cryptoparser docs test
|
|
25
33
|
|
|
26
34
|
python314:
|
|
35
|
+
extends: .test
|
|
27
36
|
image: python:3.14-slim
|
|
28
37
|
stage: earlytest
|
|
29
|
-
script: tox -e py314
|
|
30
38
|
|
|
31
39
|
python39:
|
|
40
|
+
extends: .test
|
|
32
41
|
image: python:3.9-slim
|
|
33
42
|
stage: fulltest
|
|
34
|
-
script: tox -e py39
|
|
35
43
|
|
|
36
44
|
python310:
|
|
45
|
+
extends: .test
|
|
37
46
|
image: python:3.10-slim
|
|
38
47
|
stage: fulltest
|
|
39
|
-
script: tox -e py310
|
|
40
48
|
|
|
41
49
|
python311:
|
|
50
|
+
extends: .test
|
|
42
51
|
image: python:3.11-slim
|
|
43
52
|
stage: fulltest
|
|
44
|
-
script: tox -e py311
|
|
45
53
|
|
|
46
54
|
python312:
|
|
55
|
+
extends: .test
|
|
47
56
|
image: python:3.12-slim
|
|
48
57
|
stage: fulltest
|
|
49
|
-
script: tox -e py312
|
|
50
58
|
|
|
51
59
|
python313:
|
|
60
|
+
extends: .test
|
|
52
61
|
image: python:3.13-slim
|
|
53
62
|
stage: fulltest
|
|
54
|
-
script: tox -e py313
|
|
55
63
|
|
|
56
64
|
pythonrc:
|
|
65
|
+
extends: .test
|
|
57
66
|
image: python:3.15-rc-slim
|
|
58
67
|
stage: fulltest
|
|
59
|
-
script: tox -e py315
|
|
60
68
|
|
|
61
69
|
pypy3:
|
|
70
|
+
extends: .test
|
|
62
71
|
image: pypy:3-slim
|
|
63
72
|
stage: fulltest
|
|
64
|
-
script: tox -e pypy3
|
|
65
73
|
|
|
66
74
|
coveralls:
|
|
67
75
|
image: python:3.12-slim
|
|
@@ -75,9 +83,7 @@ coveralls:
|
|
|
75
83
|
PYTHONPATH: "submodules/cryptodatahub"
|
|
76
84
|
stage: deploy
|
|
77
85
|
script:
|
|
78
|
-
- pip install coveralls
|
|
79
|
-
- pip install .
|
|
80
|
-
- pip install .[tests]
|
|
86
|
+
- uv pip install --system coveralls
|
|
81
87
|
- coverage run -m unittest -v -f
|
|
82
88
|
- coveralls
|
|
83
89
|
only:
|
|
@@ -2,6 +2,59 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
------------------
|
|
6
|
+
1.5.0 - 2026-07-31
|
|
7
|
+
------------------
|
|
8
|
+
|
|
9
|
+
Features
|
|
10
|
+
========
|
|
11
|
+
|
|
12
|
+
- IKE (``ike``)
|
|
13
|
+
|
|
14
|
+
- add IKEv1 and IKEv2 certificate payload parsing (#103)
|
|
15
|
+
- add IKEv1 identification payload parsing (#103)
|
|
16
|
+
- add IKEv1 signature payload parsing (#103)
|
|
17
|
+
- add IKEv2 identification payload parsing (#103)
|
|
18
|
+
- add IKEv2 authentication payload parsing (#103)
|
|
19
|
+
- add IKEv2 extensible authentication protocol payload parsing (#103)
|
|
20
|
+
- add IKEv2 encrypted and authenticated payload parsing (#103)
|
|
21
|
+
- keep IKEv1 and IKEv2 payloads of unknown type unparsed instead of rejecting the message (#103)
|
|
22
|
+
- add getter for the distinguished name of the IKEv1 certificate request payload (#103)
|
|
23
|
+
- add getter for the certification authority hashes of the IKEv2 certificate request payload (#103)
|
|
24
|
+
|
|
25
|
+
Refactor
|
|
26
|
+
========
|
|
27
|
+
|
|
28
|
+
- IKE (``ike``)
|
|
29
|
+
|
|
30
|
+
- parse the IKEv1 and IKEv2 identification payload data according to the identification type (#103)
|
|
31
|
+
- parse the digital signature envelope of the IKEv2 authentication payload (#103)
|
|
32
|
+
- split the ISAKMP message parsing and composing into header and payload chain steps (#103)
|
|
33
|
+
- use typed values in the IKEv2 signature hash algorithms notify payload (#103)
|
|
34
|
+
|
|
35
|
+
------------------
|
|
36
|
+
1.4.0 - 2026-07-17
|
|
37
|
+
------------------
|
|
38
|
+
|
|
39
|
+
Features
|
|
40
|
+
========
|
|
41
|
+
|
|
42
|
+
- IKE (``ike``)
|
|
43
|
+
|
|
44
|
+
- add getter for multiple payloads with the same type (#93)
|
|
45
|
+
- add IKEv2 notify payload parsing for protocol extensions (#93)
|
|
46
|
+
|
|
47
|
+
- NAT detection source IP and destination IP
|
|
48
|
+
- set window size
|
|
49
|
+
- use transport mode
|
|
50
|
+
- HTTP certificate lookup supported
|
|
51
|
+
- signature hash algorithms
|
|
52
|
+
- intermediate exchange supported
|
|
53
|
+
- use PPK
|
|
54
|
+
- redirect supported
|
|
55
|
+
- IKEv2 fragmentation supported
|
|
56
|
+
- childless IKEv2 supported
|
|
57
|
+
|
|
5
58
|
------------------
|
|
6
59
|
1.3.0 - 2026-06-15
|
|
7
60
|
------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CryptoParser
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: An analysis oriented security protocol parser and generator
|
|
5
5
|
Author-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
6
6
|
Maintainer-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
@@ -13,7 +13,6 @@ Project-URL: Source, https://gitlab.com/coroner/cryptoparser
|
|
|
13
13
|
Keywords: ssl,tls,gost,ja3,ldap,rdp,ssh,hsts,dns,ike
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Environment :: Console
|
|
16
|
-
Classifier: Framework :: tox
|
|
17
16
|
Classifier: Intended Audience :: Information Technology
|
|
18
17
|
Classifier: Intended Audience :: Science/Research
|
|
19
18
|
Classifier: Intended Audience :: System Administrators
|
|
@@ -40,7 +39,7 @@ Description-Content-Type: text/x-rst
|
|
|
40
39
|
License-File: LICENSE.txt
|
|
41
40
|
Requires-Dist: asn1crypto
|
|
42
41
|
Requires-Dist: attrs
|
|
43
|
-
Requires-Dist: cryptodatahub==1.
|
|
42
|
+
Requires-Dist: cryptodatahub==1.5.0
|
|
44
43
|
Requires-Dist: urllib3
|
|
45
44
|
Provides-Extra: tests
|
|
46
45
|
Requires-Dist: pyfakefs; extra == "tests"
|
|
@@ -61,9 +60,9 @@ Dynamic: license-file
|
|
|
61
60
|
:alt: Documentation
|
|
62
61
|
:target: https://cryptoparser.readthedocs.io
|
|
63
62
|
|
|
64
|
-
**CryptoParser** is a cryptographic protocol (TLS, SSH) and security-related protocol piece (HTTP headers) parser.
|
|
65
|
-
is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support
|
|
66
|
-
|
|
63
|
+
**CryptoParser** is a cryptographic protocol (IKE, TLS, SSH) and security-related protocol piece (HTTP headers) parser.
|
|
64
|
+
It is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing
|
|
65
|
+
cryptographic libraries or analysing cryptography-realted settings of application servers such as
|
|
67
66
|
`CryptoLyzer <https://cryptolyzer.readthedocs.io/>`__ does.
|
|
68
67
|
|
|
69
68
|
-----
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CryptoParser
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: An analysis oriented security protocol parser and generator
|
|
5
5
|
Author-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
6
6
|
Maintainer-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
@@ -13,7 +13,6 @@ Project-URL: Source, https://gitlab.com/coroner/cryptoparser
|
|
|
13
13
|
Keywords: ssl,tls,gost,ja3,ldap,rdp,ssh,hsts,dns,ike
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Environment :: Console
|
|
16
|
-
Classifier: Framework :: tox
|
|
17
16
|
Classifier: Intended Audience :: Information Technology
|
|
18
17
|
Classifier: Intended Audience :: Science/Research
|
|
19
18
|
Classifier: Intended Audience :: System Administrators
|
|
@@ -40,7 +39,7 @@ Description-Content-Type: text/x-rst
|
|
|
40
39
|
License-File: LICENSE.txt
|
|
41
40
|
Requires-Dist: asn1crypto
|
|
42
41
|
Requires-Dist: attrs
|
|
43
|
-
Requires-Dist: cryptodatahub==1.
|
|
42
|
+
Requires-Dist: cryptodatahub==1.5.0
|
|
44
43
|
Requires-Dist: urllib3
|
|
45
44
|
Provides-Extra: tests
|
|
46
45
|
Requires-Dist: pyfakefs; extra == "tests"
|
|
@@ -61,9 +60,9 @@ Dynamic: license-file
|
|
|
61
60
|
:alt: Documentation
|
|
62
61
|
:target: https://cryptoparser.readthedocs.io
|
|
63
62
|
|
|
64
|
-
**CryptoParser** is a cryptographic protocol (TLS, SSH) and security-related protocol piece (HTTP headers) parser.
|
|
65
|
-
is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support
|
|
66
|
-
|
|
63
|
+
**CryptoParser** is a cryptographic protocol (IKE, TLS, SSH) and security-related protocol piece (HTTP headers) parser.
|
|
64
|
+
It is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing
|
|
65
|
+
cryptographic libraries or analysing cryptography-realted settings of application servers such as
|
|
67
66
|
`CryptoLyzer <https://cryptolyzer.readthedocs.io/>`__ does.
|
|
68
67
|
|
|
69
68
|
-----
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
:alt: Documentation
|
|
9
9
|
:target: https://cryptoparser.readthedocs.io
|
|
10
10
|
|
|
11
|
-
**CryptoParser** is a cryptographic protocol (TLS, SSH) and security-related protocol piece (HTTP headers) parser.
|
|
12
|
-
is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support
|
|
13
|
-
|
|
11
|
+
**CryptoParser** is a cryptographic protocol (IKE, TLS, SSH) and security-related protocol piece (HTTP headers) parser.
|
|
12
|
+
It is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing
|
|
13
|
+
cryptographic libraries or analysing cryptography-realted settings of application servers such as
|
|
14
14
|
`CryptoLyzer <https://cryptolyzer.readthedocs.io/>`__ does.
|
|
15
15
|
|
|
16
16
|
-----
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
2
|
# pylint: disable=too-many-lines
|
|
4
3
|
|
|
5
4
|
import abc
|
|
@@ -14,7 +13,7 @@ import ipaddress
|
|
|
14
13
|
try:
|
|
15
14
|
from collections.abc import MutableSequence # only works on python 3.3+
|
|
16
15
|
except ImportError: # pragma: no cover
|
|
17
|
-
from collections import MutableSequence # pylint: disable=deprecated-class
|
|
16
|
+
from collections.abc import MutableSequence # pylint: disable=deprecated-class
|
|
18
17
|
|
|
19
18
|
from collections import OrderedDict
|
|
20
19
|
|
|
@@ -49,7 +48,7 @@ _default.default = json.JSONEncoder().default
|
|
|
49
48
|
json.JSONEncoder.default = _default
|
|
50
49
|
|
|
51
50
|
|
|
52
|
-
class SerializableTextEncoder
|
|
51
|
+
class SerializableTextEncoder:
|
|
53
52
|
def __call__(self, obj, level):
|
|
54
53
|
if isinstance(obj, str):
|
|
55
54
|
string_result = obj
|
|
@@ -59,7 +58,7 @@ class SerializableTextEncoder():
|
|
|
59
58
|
return False, string_result
|
|
60
59
|
|
|
61
60
|
|
|
62
|
-
class Serializable
|
|
61
|
+
class Serializable: # pylint: disable=too-few-public-methods
|
|
63
62
|
_MARKDOWN_RESULT_STRING_CLASSES = (
|
|
64
63
|
ipaddress.IPv4Network,
|
|
65
64
|
ipaddress.IPv6Network,
|
|
@@ -367,7 +366,7 @@ class VariantParsableExact(VariantParsableBase):
|
|
|
367
366
|
|
|
368
367
|
|
|
369
368
|
@attr.s
|
|
370
|
-
class VectorParamBase
|
|
369
|
+
class VectorParamBase: # pylint: disable=too-few-public-methods
|
|
371
370
|
min_byte_num = attr.ib(validator=attr.validators.instance_of(int))
|
|
372
371
|
max_byte_num = attr.ib(validator=attr.validators.instance_of(int))
|
|
373
372
|
item_num_size = attr.ib(init=False, validator=attr.validators.instance_of(int))
|
|
@@ -863,7 +862,7 @@ class StringEnumParsableBase(ParsableBaseNoABC):
|
|
|
863
862
|
return self._asdict().encode('ascii')
|
|
864
863
|
|
|
865
864
|
def _asdict(self):
|
|
866
|
-
return
|
|
865
|
+
return self.value.code
|
|
867
866
|
|
|
868
867
|
|
|
869
868
|
class StringEnumParsable(StringEnumParsableBase):
|
|
@@ -946,7 +945,7 @@ class ProtocolVersionMajorMinorBase(ProtocolVersionBase):
|
|
|
946
945
|
|
|
947
946
|
|
|
948
947
|
@attr.s
|
|
949
|
-
class ListParamParsable
|
|
948
|
+
class ListParamParsable: # pylint: disable=too-few-public-methods
|
|
950
949
|
item_class = attr.ib(validator=attr.validators.instance_of(type))
|
|
951
950
|
fallback_class = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(type)))
|
|
952
951
|
separator_class = attr.ib(attr.validators.instance_of(ParsableBase))
|
|
@@ -994,7 +993,7 @@ class ListParsable(ArrayBase):
|
|
|
994
993
|
class OpaqueEnumParsable(Vector):
|
|
995
994
|
@classmethod
|
|
996
995
|
def _parse(cls, parsable):
|
|
997
|
-
opaque, parsed_length = super(
|
|
996
|
+
opaque, parsed_length = super()._parse(parsable)
|
|
998
997
|
code = b''.join([bytes((opaque_item,)) for opaque_item in opaque]).decode(cls.get_encoding())
|
|
999
998
|
|
|
1000
999
|
try:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
2
|
# pylint: disable=too-many-lines
|
|
4
3
|
|
|
5
4
|
import abc
|
|
@@ -540,7 +539,7 @@ class FieldValueComponentPercent(FieldValueComponentNumber):
|
|
|
540
539
|
|
|
541
540
|
|
|
542
541
|
@attr.s
|
|
543
|
-
class FieldValueComponentStringEnumParams
|
|
542
|
+
class FieldValueComponentStringEnumParams:
|
|
544
543
|
code = attr.ib(validator=attr.validators.instance_of(str))
|
|
545
544
|
|
|
546
545
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
2
|
# pylint: disable=too-many-lines
|
|
4
3
|
|
|
5
4
|
import abc
|
|
@@ -19,7 +18,7 @@ from cryptoparser.common.exception import InvalidType, NotEnoughData, TooMuchDat
|
|
|
19
18
|
import cryptoparser.common.utils
|
|
20
19
|
|
|
21
20
|
|
|
22
|
-
class ParsableBaseNoABC
|
|
21
|
+
class ParsableBaseNoABC:
|
|
23
22
|
@classmethod
|
|
24
23
|
def parse_mutable(cls, parsable):
|
|
25
24
|
parsed_object, parsed_length = cls._parse(parsable)
|
|
@@ -96,7 +95,7 @@ class ParserBase(collections.abc.Mapping):
|
|
|
96
95
|
validator=attr.validators.instance_of((bytes, bytearray))
|
|
97
96
|
)
|
|
98
97
|
_parsed_length: int = attr.ib(init=False, default=0)
|
|
99
|
-
_parsed_values:
|
|
98
|
+
_parsed_values: dict[str, typing.Any] = attr.ib(init=False, default=None)
|
|
100
99
|
|
|
101
100
|
def __attrs_post_init__(self):
|
|
102
101
|
if self._parsed_values is None:
|
|
@@ -165,7 +164,7 @@ class ParserBase(collections.abc.Mapping):
|
|
|
165
164
|
value = self._parsable[self._parsed_length:self._parsed_length + parsable_length]
|
|
166
165
|
try:
|
|
167
166
|
value = value.decode(encoding)
|
|
168
|
-
if converter
|
|
167
|
+
if converter is not str:
|
|
169
168
|
value = converter(value)
|
|
170
169
|
self._parsed_values[name] = value
|
|
171
170
|
except UnicodeError as e:
|
|
@@ -760,8 +759,8 @@ class ParserBinary(ParserBase):
|
|
|
760
759
|
|
|
761
760
|
|
|
762
761
|
@attr.s
|
|
763
|
-
class ComposerBase
|
|
764
|
-
_composed = attr.ib(init=False, default=
|
|
762
|
+
class ComposerBase:
|
|
763
|
+
_composed = attr.ib(init=False, default=b'')
|
|
765
764
|
|
|
766
765
|
@property
|
|
767
766
|
def composed(self):
|
|
@@ -795,7 +794,7 @@ class ComposerText(ComposerBase):
|
|
|
795
794
|
self._encoding = encoding
|
|
796
795
|
|
|
797
796
|
def _compose_numeric_array(self, values, separator):
|
|
798
|
-
composed_str =
|
|
797
|
+
composed_str = ''
|
|
799
798
|
|
|
800
799
|
for value in values:
|
|
801
800
|
composed_str += f'{value:d}{separator}'
|
|
@@ -969,7 +968,7 @@ class ComposerBinary(ComposerBase):
|
|
|
969
968
|
self.compose_numeric(len(composed), item_size)
|
|
970
969
|
self._composed += composed
|
|
971
970
|
|
|
972
|
-
def compose_parsable_array(self, values, separator=
|
|
971
|
+
def compose_parsable_array(self, values, separator=b''):
|
|
973
972
|
self._composed += separator.join(map(lambda item: item.compose(), values))
|
|
974
973
|
|
|
975
974
|
def compose_bytes(self, value, item_size, converter=bytearray):
|