Commit 0be1b7f9 authored by Robert Labudda's avatar Robert Labudda
Browse files

findpgpkey: there can be multiple headers in an email

parent 864f555a
......@@ -301,10 +301,19 @@ if __name__ == '__main__':
eprint(f'Found {header} header')
value = eml[header].strip()
if ';' in value:
values = [v.strip() for v in value.split(';')]
values = [value]
values = [v.split('=', 1)[1] if '=' in v else v for v in values[:]]
for value in values:
if value.lower().startswith('0x'):
eprint(f'... found ID {value}')
if '://' in value:
if value.startswith('<') and value.endswith('>'):
value = value[1:-1]
eprint(f'... found URL {value}')
if ''.join([ch for ch in value if ch in string.hexdigits]) == value:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment