Skip to content

Commit 2550609

Browse files
committed
Fixed parsing of armored PGP keys by removing a possible 'Charset' field that I had not expected before.
Bumping release to 1.0.12
1 parent cb1c48e commit 2550609

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "gitxray"
7-
version = "1.0.11"
7+
version = "1.0.12"
88
authors = [
99
{ name="Lucas Lavarello", email="[email protected]" },
1010
]

src/gitxray/gitxray.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def gitxray_cli():
1919
░░██████ ░░██████
2020
░░░░░░ ░░░░░░
2121
gitxray: X-Ray and analyze Github Repositories and their Contributors. Trust no one!
22-
v1.0.11 - Developed by Kulkan Security [www.kulkan.com] - Penetration testing by creative minds.
22+
v1.0.12 - Developed by Kulkan Security [www.kulkan.com] - Penetration testing by creative minds.
2323
"""+"#"*gx_definitions.SCREEN_SEPARATOR_LENGTH)
2424

2525
# Let's initialize a Gitxray context, which parses arguments and more.

src/gitxray/include/gx_ugly_openpgp_parser.py

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def ugly_inhouse_openpgp_block(pgp_armored_input):
114114

115115
# format the data a bit by removing unwanted strings and chars, also consider a potential Version
116116
base64_str = re.sub(r'-----BEGIN PGP SIGNATURE-----|-----BEGIN PGP PUBLIC KEY BLOCK-----', '', pgp_armored_input)
117+
base64_str = re.sub(r'Charset: (.+)\r?\n?', '', base64_str)
117118
base64_str = re.sub(r'Version: (.+)\r?\n?', '', base64_str)
118119
base64_str = re.sub(r'Comment: (.+)\r?\n?', '', base64_str)
119120
base64_str = re.sub(r'-----END PGP SIGNATURE-----|-----END PGP PUBLIC KEY BLOCK-----', '', base64_str)

0 commit comments

Comments
 (0)