pypcapkit 1.3.1.post24__pp38-none-any.whl → 1.3.3__pp38-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 CHANGED
@@ -123,4 +123,4 @@ __all__ = [
123
123
  ]
124
124
 
125
125
  #: version number
126
- __version__ = '1.3.1.post24'
126
+ __version__ = '1.3.3'
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
@@ -26212,6 +26212,12 @@ class AppType(StrEnum):
26212
26212
  #: [UDP] Reserved
26213
26213
  reserved_27010: 'AppType' = 27010, 'reserved', TransportProtocol.get('udp')
26214
26214
 
26215
+ #: [TCP] Cloud hosting environment network
26216
+ chlenix: 'AppType' = 27016, 'chlenix', TransportProtocol.get('tcp')
26217
+
26218
+ #: [UDP] Reserved
26219
+ reserved_27016: 'AppType' = 27016, 'reserved', TransportProtocol.get('udp')
26220
+
26215
26221
  #: [TCP] Mongo database system
26216
26222
  mongodb: 'AppType' = 27017, 'mongodb', TransportProtocol.get('tcp')
26217
26223
 
@@ -27921,6 +27927,11 @@ class AppType(StrEnum):
27921
27927
  #: [TCP] The Bootstrapping Remote Secure Key Infrastructure Proxy [:rfc:`8995`]
27922
27928
  brski_proxy: 'AppType' = -1, 'brski-proxy', TransportProtocol.get('tcp')
27923
27929
 
27930
+ #: [TCP] Bootstrapping Remote Secure Key Infrastructure registrar with CMP
27931
+ #: capabilities according to the Lightweight CMP Profile (LCMPP, [RFC9483])
27932
+ #: [RFC-ietf-anima-brski-ae-13]
27933
+ brski_reg_cmp: 'AppType' = -1, 'brski-reg-cmp', TransportProtocol.get('tcp')
27934
+
27924
27935
  #: [TCP] The Bootstrapping Remote Secure Key Infrastructure Registrar
27925
27936
  #: [:rfc:`8995`]
27926
27937
  brski_registrar: 'AppType' = -1, 'brski-registrar', TransportProtocol.get('tcp')
@@ -28459,6 +28470,9 @@ class AppType(StrEnum):
28459
28470
  #: [TCP] An application to communicate with other
28460
28471
  hola: 'AppType' = -1, 'hola', TransportProtocol.get('tcp')
28461
28472
 
28473
+ #: [TCP] Home Assistant
28474
+ home_assistant: 'AppType' = -1, 'home-assistant', TransportProtocol.get('tcp')
28475
+
28462
28476
  #: [N/A] iTunes Home Sharing
28463
28477
  home_sharing: 'AppType' = -1, 'home-sharing', TransportProtocol.get('undefined')
28464
28478
 
@@ -29220,6 +29234,9 @@ class AppType(StrEnum):
29220
29234
  #: [N/A] oprofile server protocol
29221
29235
  oprofile: 'AppType' = -1, 'oprofile', TransportProtocol.get('undefined')
29222
29236
 
29237
+ #: [TCP] ORO Core server REST configuration and control API
29238
+ oro: 'AppType' = -1, 'oro', TransportProtocol.get('tcp')
29239
+
29223
29240
  #: [UDP] Open Sound Control Interface Transfer
29224
29241
  oscit: 'AppType' = -1, 'oscit', TransportProtocol.get('udp')
29225
29242
 
@@ -32307,7 +32324,7 @@ class AppType(StrEnum):
32307
32324
  if 27000 <= value <= 27009:
32308
32325
  #: [N/A] FLEX LM (1-10)
32309
32326
  return extend_enum(cls, 'flex_lm_%d' % value, value, 'flex-lm', TransportProtocol.get('undefined'))
32310
- if 27011 <= value <= 27016:
32327
+ if 27011 <= value <= 27015:
32311
32328
  #: [N/A] Unassigned
32312
32329
  return extend_enum(cls, 'unassigned_%d' % value, value, 'unassigned', TransportProtocol.get('undefined'))
32313
32330
  if 27018 <= value <= 27344:
@@ -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 146 <= value <= 252:
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)
@@ -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.error(str(exc), exc_info=exc, stack_info=DEVMODE, stacklevel=stacklevel())
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))
@@ -101,16 +101,16 @@ class BaseError(Exception):
101
101
  # log error
102
102
  if not quiet:
103
103
  if DEVMODE:
104
- logger.error('%s: %s', type(self).__name__, str(self),
105
- exc_info=self if VERBOSE else False,
106
- stack_info=VERBOSE, stacklevel=-stacklevel())
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.error('%s: %s', type(self).__name__, str(self))
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.warning('%s: %s', type(self).__name__, str(self))
113
+ logger.error('%s: %s', type(self).__name__, str(self))
114
114
 
115
115
  if not DEVMODE:
116
116
  sys.tracebacklimit = 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypcapkit
3
- Version: 1.3.1.post24
3
+ Version: 1.3.3
4
4
  Summary: PyPCAPKit: comprehensive network packet analysis library
5
5
  Author-email: Jarry Shaw <jarryshaw@icloud.com>
6
6
  Maintainer: Jarry Shaw
@@ -1,5 +1,5 @@
1
- pcapkit/__init__.py,sha256=VGY-F4gL-G8mfksgZOYjIt4mOPm7vRTiQhEUfn2MQAc,4098
2
- pcapkit/__main__.py,sha256=pckITFrDzzXCXPM_r03AAhvpGyqFWdwyKDkGRZENiv4,6313
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
@@ -117,10 +117,10 @@ pcapkit/const/pcapng/record_type.py,sha256=4rZytbhhF6u5SPvQ8ew3jx4OhN_rwDQG3I4Jl
117
117
  pcapkit/const/pcapng/secrets_type.py,sha256=n_662aowLtqA25ilbdG6BWb2rYmrdBJt79_SISzfJkw,1578
118
118
  pcapkit/const/pcapng/verdict_type.py,sha256=_jEkN0g6CX-DGshAj-lUiZjiwdK7Fqou2pnzgZ-WyIk,1476
119
119
  pcapkit/const/reg/__init__.py,sha256=xKABPHwDQ0diN2sFA7hkw42FNsb6tx294XemEjTs2g8,1469
120
- pcapkit/const/reg/apptype.py,sha256=hua4Ewul4xhjJiWCMMAvOupeG0YL2woK19sbcCj3sc8,1430802
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=Y5Ytz6UOXrMHft3HXFRKS5JRZpCrlLi9XIzSh_2Gx1s,12888
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=qODxCY5OywT45vkQ-9tDibrtNSHJeIjF1m8_2PfDPzs,7156
330
- pcapkit/utilities/exceptions.py,sha256=LfI3XW4awaiHHYIbsHyG66r7iuJ3sL_e9B-WadwJfWM,11082
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.1.post24.dist-info/LICENSE,sha256=KkKND5E2e1Z6CQvSLPc1lRBy4xPRed41AG6q1txotWk,1516
462
- pypcapkit-1.3.1.post24.dist-info/METADATA,sha256=um7Kfhh9uAOnfkAlhgPVF2OCOTXHX3ANfmgnOsIlkmQ,7705
463
- pypcapkit-1.3.1.post24.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
464
- pypcapkit-1.3.1.post24.dist-info/entry_points.txt,sha256=8tVaZ-N0S2t19ELoTEGq_OlC8-dSmd7dvNn-kMV3afY,100
465
- pypcapkit-1.3.1.post24.dist-info/top_level.txt,sha256=KEssKRhG9ln3EOfGH-yi98HgI-MM9hOHy09QQP-fvk8,8
466
- pypcapkit-1.3.1.post24.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.2)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5