mirror of
https://github.com/bikini/patchwork
synced 2026-06-27 08:08:41 +00:00
23 lines
616 B
Python
23 lines
616 B
Python
MARKER = 'PATCHWORK_LITERAL_MARKER_9f8b6b7d'
|
|
UNICODE = 'snowman=\u2603 rocket=\U0001f680 accents=naive cafe'
|
|
LONG_TEXT = 'alpha:' + ('0123456789abcdef' * 12) + ':omega'
|
|
PAYLOAD = bytes(range(32)) + b'PATCHWORK_BYTES_MARKER'
|
|
|
|
|
|
def build() -> tuple[str, bytes]:
|
|
joined = '|'.join([MARKER, UNICODE, LONG_TEXT])
|
|
masked = bytes((b ^ 0x5A) for b in PAYLOAD)
|
|
return joined, masked
|
|
|
|
|
|
def run() -> None:
|
|
text, blob = build()
|
|
print('text-len:', len(text))
|
|
print('text-head:', text[:42])
|
|
print('blob-len:', len(blob))
|
|
print('blob-tail:', blob[-12:].hex())
|
|
|
|
|
|
if __name__ == '__main__':
|
|
run()
|