mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-24 03:42:43 -06:00
12 lines
No EOL
503 B
Python
12 lines
No EOL
503 B
Python
from collections import namedtuple
|
|
|
|
USER_AGENT = "com.apple.madrid-lookup [macOS,13.2.1,22D68,MacBookPro18,3]"
|
|
PROTOCOL_VERSION = "1640"
|
|
|
|
# KeyPair is a named tuple that holds a key and a certificate in PEM form
|
|
KeyPair = namedtuple("KeyPair", ["key", "cert"])
|
|
|
|
def dearmour(armoured: str) -> str:
|
|
import re
|
|
# Use a regex to remove the header and footer (generic so it work on more than just certificates)
|
|
return re.sub(r"-----BEGIN .*-----|-----END .*-----", "", armoured).replace("\n", "") |