pypcapkit 1.3.1.post27__cp312-none-any.whl → 1.3.3__cp312-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pcapkit/__init__.py +1 -1
- pcapkit/__main__.py +2 -2
- pcapkit/const/reg/transtype.py +4 -1
- pcapkit/utilities/decorators.py +1 -4
- pcapkit/utilities/exceptions.py +5 -5
- {pypcapkit-1.3.1.post27.dist-info → pypcapkit-1.3.3.dist-info}/METADATA +1 -1
- {pypcapkit-1.3.1.post27.dist-info → pypcapkit-1.3.3.dist-info}/RECORD +11 -11
- {pypcapkit-1.3.1.post27.dist-info → pypcapkit-1.3.3.dist-info}/WHEEL +1 -1
- {pypcapkit-1.3.1.post27.dist-info → pypcapkit-1.3.3.dist-info}/LICENSE +0 -0
- {pypcapkit-1.3.1.post27.dist-info → pypcapkit-1.3.3.dist-info}/entry_points.txt +0 -0
- {pypcapkit-1.3.1.post27.dist-info → pypcapkit-1.3.3.dist-info}/top_level.txt +0 -0
pcapkit/__init__.py
CHANGED
pcapkit/__main__.py
CHANGED
@@ -120,7 +120,7 @@ def main() -> 'int':
|
|
120
120
|
if args.verbose:
|
121
121
|
try:
|
122
122
|
print(emoji.emojize(f":police_car_light: Loading file {extractor.input!r}"))
|
123
|
-
except UnicodeEncodeError:
|
123
|
+
except (UnicodeEncodeError, NameError): # may trigger if emoji not installed
|
124
124
|
print(f"[*] Loading file {extractor.input!r}")
|
125
125
|
|
126
126
|
for _ in extractor:
|
@@ -128,7 +128,7 @@ def main() -> 'int':
|
|
128
128
|
|
129
129
|
try:
|
130
130
|
print(emoji.emojize(f":beer_mug: Report file{'s' if args.files else ''} stored in {extractor.output!r}"))
|
131
|
-
except UnicodeEncodeError:
|
131
|
+
except (UnicodeEncodeError, NameError): # may trigger if emoji not installed
|
132
132
|
print(f"[*] Report file{'s' if args.files else ''} stored in {extractor.output!r}")
|
133
133
|
|
134
134
|
return 0
|
pcapkit/const/reg/transtype.py
CHANGED
@@ -479,6 +479,9 @@ class TransType(IntEnum):
|
|
479
479
|
#: Network Service Header [:rfc:`9491`]
|
480
480
|
NSH = 145
|
481
481
|
|
482
|
+
#: Homa [HomaModule][John Ousterhout]
|
483
|
+
Homa = 146
|
484
|
+
|
482
485
|
#: Use for experimentation and testing [:rfc:`3692`]
|
483
486
|
Use_for_experimentation_and_testing_253 = 253
|
484
487
|
|
@@ -514,7 +517,7 @@ class TransType(IntEnum):
|
|
514
517
|
"""
|
515
518
|
if not (isinstance(value, int) and 0 <= value <= 255):
|
516
519
|
raise ValueError('%r is not a valid %s' % (value, cls.__name__))
|
517
|
-
if
|
520
|
+
if 147 <= value <= 252:
|
518
521
|
#: Unassigned [Internet Assigned Numbers Authority]
|
519
522
|
return extend_enum(cls, 'Unassigned_%d' % value, value)
|
520
523
|
return super()._missing_(value)
|
pcapkit/utilities/decorators.py
CHANGED
@@ -14,7 +14,6 @@ decorators, including :func:`~pcapkit.utilities.decorators.seekset`,
|
|
14
14
|
import functools
|
15
15
|
import io
|
16
16
|
import os
|
17
|
-
import traceback
|
18
17
|
from typing import TYPE_CHECKING, cast
|
19
18
|
|
20
19
|
from pcapkit.utilities.exceptions import StructError, stacklevel
|
@@ -123,9 +122,7 @@ def beholder(func: 'Callable[Concatenate[Protocol, int, Optional[int], P], R_beh
|
|
123
122
|
# error = traceback.format_exc(limit=1).strip().rsplit(os.linesep, maxsplit=1)[-1]
|
124
123
|
|
125
124
|
# log error
|
126
|
-
logger.
|
127
|
-
if VERBOSE:
|
128
|
-
traceback.print_exc()
|
125
|
+
logger.warning(str(exc), exc_info=exc if VERBOSE else None, stack_info=DEVMODE, stacklevel=stacklevel())
|
129
126
|
|
130
127
|
file_ = self.__header__.get_payload()
|
131
128
|
next_ = protocol(file_, length, error=str(exc))
|
pcapkit/utilities/exceptions.py
CHANGED
@@ -101,16 +101,16 @@ class BaseError(Exception):
|
|
101
101
|
# log error
|
102
102
|
if not quiet:
|
103
103
|
if DEVMODE:
|
104
|
-
logger.
|
105
|
-
|
106
|
-
|
104
|
+
logger.critical('%s: %s', type(self).__name__, str(self),
|
105
|
+
exc_info=self if VERBOSE else False,
|
106
|
+
stack_info=VERBOSE, stacklevel=-stacklevel())
|
107
107
|
else:
|
108
|
-
logger.
|
108
|
+
logger.critical("%s: %s", type(self).__name__, str(self))
|
109
109
|
|
110
110
|
# logger.error('%s: %s', type(self).__name__, str(self), exc_info=self,
|
111
111
|
# stack_info=True, stacklevel=-stacklevel())
|
112
112
|
else:
|
113
|
-
logger.
|
113
|
+
logger.error('%s: %s', type(self).__name__, str(self))
|
114
114
|
|
115
115
|
if not DEVMODE:
|
116
116
|
sys.tracebacklimit = 0
|
@@ -1,5 +1,5 @@
|
|
1
|
-
pcapkit/__init__.py,sha256=
|
2
|
-
pcapkit/__main__.py,sha256=
|
1
|
+
pcapkit/__init__.py,sha256=5Jr8vAES7SAC2ttUsP31Qc9e9IoKIbLMTdB6y0YNPKg,4091
|
2
|
+
pcapkit/__main__.py,sha256=G3rJrhCwkxlxOa04zwRJ4mq4G1k8JYWES3JnsaeMDe4,6415
|
3
3
|
pcapkit/all.py,sha256=6G7rVFlajYk98F5vCYcLOw-CkXdEw4C2zAwnTgU0asU,6679
|
4
4
|
pcapkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
pcapkit/const/__init__.py,sha256=XpEr66hXmBpBofS5aHiTZXTG8VZlxU7xy0BNXBKCi1Q,3266
|
@@ -120,7 +120,7 @@ pcapkit/const/reg/__init__.py,sha256=xKABPHwDQ0diN2sFA7hkw42FNsb6tx294XemEjTs2g8
|
|
120
120
|
pcapkit/const/reg/apptype.py,sha256=OyGXkycikojZDpoaaLsCMglEA3oWwVFbfIa9VeCFeHg,1431540
|
121
121
|
pcapkit/const/reg/ethertype.py,sha256=6Xz-MugXqQMc8hUHmkMMK_zeeYlkJ1Ql9Jtek_e3j1g,26564
|
122
122
|
pcapkit/const/reg/linktype.py,sha256=WU5JvrvjuvWZbdcZaVrb5pGzUEFlS0aTNBZNXa-93Os,34895
|
123
|
-
pcapkit/const/reg/transtype.py,sha256=
|
123
|
+
pcapkit/const/reg/transtype.py,sha256=ub1J9FMvhg4DQqmseg2bp950HnCpkEUqGq5gDdpQusk,12946
|
124
124
|
pcapkit/const/tcp/__init__.py,sha256=PSTSxmdKt5l4NBsXq4m8x6dELWqOSNQxAuWePqTNAw8,1494
|
125
125
|
pcapkit/const/tcp/checksum.py,sha256=0SSu5WD2_BcN6CYnIMI0AoToDBFTcVrxOYNzGinm7kE,1524
|
126
126
|
pcapkit/const/tcp/flags.py,sha256=hTsqWViSxku-j8zsbP3274UxNIeNsBF4ZJAyAXMQnRs,1740
|
@@ -326,8 +326,8 @@ pcapkit/toolkit/pyshark.py,sha256=37KdzGls8b8aI7d-MHS9k0QQbo9Gm1sRDth-eLKVToA,33
|
|
326
326
|
pcapkit/toolkit/scapy.py,sha256=L-rmqDWgTjHOH_MiqcwtYXhaPm3pzGc0kh1IUzNyzkI,11445
|
327
327
|
pcapkit/utilities/__init__.py,sha256=nd_SO3k9zXgi-Vesa1bhBiAgu55x2BeRMclLsdz9RWg,692
|
328
328
|
pcapkit/utilities/compat.py,sha256=fq16iG0leV4cyglNn2GeXdIIwUVzwMXGtdPigrejrgo,6533
|
329
|
-
pcapkit/utilities/decorators.py,sha256=
|
330
|
-
pcapkit/utilities/exceptions.py,sha256=
|
329
|
+
pcapkit/utilities/decorators.py,sha256=ZzWyk-l3jyEYbqpdB1YLo5YYcJs0UZ7g3vOMs7OXuzU,7101
|
330
|
+
pcapkit/utilities/exceptions.py,sha256=2T2KvTXfzfs2iGuRkbczq_0zTN9jpwhrV-_8ULikP_M,11092
|
331
331
|
pcapkit/utilities/logging.py,sha256=-QAMfEfoWO17FwZoPHYN_2RL8tp8HlJNwbdu3eJXMfE,1935
|
332
332
|
pcapkit/utilities/warnings.py,sha256=2b8IXVIWLHb8DBsMFdiBF87kaVp1y1ELxbHYpm2zD2s,5068
|
333
333
|
pcapkit/vendor/__init__.py,sha256=nFCn9gu6N0JCAd2_xdParYoUfdUd9F4BhrcYD_Cq0_M,3940
|
@@ -458,9 +458,9 @@ pcapkit/vendor/tcp/mp_tcp_option.py,sha256=f6_-VMoQFnhuEbxs17Q1rp6JjFSLXGK3w1K2v
|
|
458
458
|
pcapkit/vendor/tcp/option.py,sha256=p05DrOt2m0QCf4gjLJzRshQRvaWxmt2PIzsv2UMjsa8,3043
|
459
459
|
pcapkit/vendor/vlan/__init__.py,sha256=qvLktJ0yuoZokas6-_ZGwMJOzbujSCM8pZHQ9jjTegU,674
|
460
460
|
pcapkit/vendor/vlan/priority_level.py,sha256=xVu6M-Ys4pft5I-qPCCxM-KfnMAUnZppD2qPO9gPkVE,2961
|
461
|
-
pypcapkit-1.3.
|
462
|
-
pypcapkit-1.3.
|
463
|
-
pypcapkit-1.3.
|
464
|
-
pypcapkit-1.3.
|
465
|
-
pypcapkit-1.3.
|
466
|
-
pypcapkit-1.3.
|
461
|
+
pypcapkit-1.3.3.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
|
462
|
+
pypcapkit-1.3.3.dist-info/METADATA,sha256=QAHLazrk1Gua8_Bcw7N2SV7vbYZ-FTtwbUybd2Od7i8,7698
|
463
|
+
pypcapkit-1.3.3.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
464
|
+
pypcapkit-1.3.3.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
|
465
|
+
pypcapkit-1.3.3.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
|
466
|
+
pypcapkit-1.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|