Initial draft.
This commit is contained in:
@@ -6,8 +6,10 @@
|
||||
################################################################################################################################
|
||||
|
||||
import binascii
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
import zlib
|
||||
|
||||
prefixes = ('request', 'response')
|
||||
@@ -17,6 +19,8 @@ linecharlimit = 80
|
||||
linestrp = re.compile(r'^\s*(?P<hex>[A-Fa-f0-9N]+)?(?:\s*//.*)?$')
|
||||
thisdir = pathlib.Path(__file__).absolute().parent
|
||||
|
||||
is_tty = os.isatty(sys.stdout.fileno())
|
||||
|
||||
|
||||
def parse(text):
|
||||
ret = []
|
||||
@@ -57,6 +61,7 @@ for p in prefixes:
|
||||
repr_split = []
|
||||
for i in range(0, len(repr), 16):
|
||||
repr_split.append(repr[i:i + 16])
|
||||
print(fnamebase)
|
||||
for i in repr_split:
|
||||
print(', '.join(i), end = ',\n')
|
||||
if is_tty:
|
||||
print(fnamebase)
|
||||
for i in repr_split:
|
||||
print(', '.join(i), end = ',\n')
|
||||
|
||||
Reference in New Issue
Block a user