traffic-taffy 0.8__py3-none-any.whl → 0.8.1__py3-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.
- traffic_taffy/__init__.py +1 -1
- traffic_taffy/compare.py +18 -4
- {traffic_taffy-0.8.dist-info → traffic_taffy-0.8.1.dist-info}/METADATA +1 -1
- {traffic_taffy-0.8.dist-info → traffic_taffy-0.8.1.dist-info}/RECORD +7 -7
- {traffic_taffy-0.8.dist-info → traffic_taffy-0.8.1.dist-info}/WHEEL +0 -0
- {traffic_taffy-0.8.dist-info → traffic_taffy-0.8.1.dist-info}/entry_points.txt +0 -0
- {traffic_taffy-0.8.dist-info → traffic_taffy-0.8.1.dist-info}/licenses/LICENSE.txt +0 -0
traffic_taffy/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "0.8"
|
1
|
+
__VERSION__ = "0.8.1"
|
traffic_taffy/compare.py
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from logging import debug, error
|
5
5
|
from typing import List, TYPE_CHECKING
|
6
|
-
import datetime as dt
|
7
6
|
from datetime import datetime
|
7
|
+
import datetime as dt
|
8
|
+
import itertools
|
8
9
|
|
9
10
|
if TYPE_CHECKING:
|
10
11
|
from argparse import ArgumentParser, Namespace
|
@@ -102,9 +103,22 @@ class PcapCompare:
|
|
102
103
|
def compare_all(self, dissections: List[Dissection]) -> List[Comparison]:
|
103
104
|
"""Compare all loaded pcaps."""
|
104
105
|
reports = []
|
105
|
-
|
106
|
+
|
107
|
+
# hack to figure out if there is at least two instances of a generator
|
108
|
+
# without actually extracting them all
|
109
|
+
# (since it could be memory expensive)
|
110
|
+
reference = next(dissections)
|
111
|
+
other = None
|
112
|
+
multiple = True
|
113
|
+
try:
|
114
|
+
other = next(dissections)
|
115
|
+
dissections = itertools.chain([other], dissections)
|
116
|
+
except Exception as e:
|
117
|
+
print(e)
|
118
|
+
multiple = False
|
119
|
+
|
120
|
+
if multiple:
|
106
121
|
# multiple file comparison
|
107
|
-
reference = next(dissections)
|
108
122
|
for other in dissections:
|
109
123
|
# compare the two global summaries
|
110
124
|
|
@@ -116,7 +130,7 @@ class PcapCompare:
|
|
116
130
|
reports.append(report)
|
117
131
|
else:
|
118
132
|
# deal with timestamps within a single file
|
119
|
-
reference =
|
133
|
+
reference = reference.data
|
120
134
|
timestamps = list(reference.keys())
|
121
135
|
if len(timestamps) <= 2: # just 0-summary plus a single stamp
|
122
136
|
error(
|
@@ -1,5 +1,5 @@
|
|
1
|
-
traffic_taffy/__init__.py,sha256=
|
2
|
-
traffic_taffy/compare.py,sha256=
|
1
|
+
traffic_taffy/__init__.py,sha256=cGUURt3LgcflHlV_5CG6SItz7kLJVNNBZFU8RU7RSJY,22
|
2
|
+
traffic_taffy/compare.py,sha256=4T25Ygp6rQw7J3syn4Tam6tEw3ieSzl-lELPARvNnVw,8641
|
3
3
|
traffic_taffy/comparison.py,sha256=MmCxK7E3RbVLS8gJ_JJOdqa2MHQ7np1Pq_VB0Scir8U,933
|
4
4
|
traffic_taffy/dissection.py,sha256=-jXt4PYCi_lvPh86KC_84VywRZqhZ1cGgLdV2glCQC8,17390
|
5
5
|
traffic_taffy/dissectmany.py,sha256=kJO2XF8QzOmLDsKDjZIkQBmxC97wFpi-IisCURLOmfU,4700
|
@@ -36,8 +36,8 @@ traffic_taffy/tools/dissect.py,sha256=Z_5JJ92E4168_GZM_9Iu-m6lDfETBt8Gv-vD_Mu3Cf
|
|
36
36
|
traffic_taffy/tools/explore.py,sha256=Hb4x9HZkFoYnR8BJKF5OLwZWKGR3RX3MdZhX4Oo-NDU,24180
|
37
37
|
traffic_taffy/tools/export.py,sha256=BuAnZcOszj9ZpMxHmRjDqptR15dMRigOhp2-BFJHgWA,2707
|
38
38
|
traffic_taffy/tools/graph.py,sha256=gARv5-7N5MUBSJJ8Uj5XLx4xEonXgIMADKwN573jxyk,2555
|
39
|
-
traffic_taffy-0.8.dist-info/METADATA,sha256=
|
40
|
-
traffic_taffy-0.8.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
41
|
-
traffic_taffy-0.8.dist-info/entry_points.txt,sha256=ySz30b1Cu03CtCGMRqqg0NZJpzrVI91T5HjbEaTNnpQ,314
|
42
|
-
traffic_taffy-0.8.dist-info/licenses/LICENSE.txt,sha256=hiV1DJgDQeSM1r7P-ez5oxily11S5nsCedU0jKzKKzo,11338
|
43
|
-
traffic_taffy-0.8.dist-info/RECORD,,
|
39
|
+
traffic_taffy-0.8.1.dist-info/METADATA,sha256=MSgtWi6_e2R7wxBETCrzuPu_hI5QMXJa_n5ATjmJR6c,1933
|
40
|
+
traffic_taffy-0.8.1.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
41
|
+
traffic_taffy-0.8.1.dist-info/entry_points.txt,sha256=ySz30b1Cu03CtCGMRqqg0NZJpzrVI91T5HjbEaTNnpQ,314
|
42
|
+
traffic_taffy-0.8.1.dist-info/licenses/LICENSE.txt,sha256=hiV1DJgDQeSM1r7P-ez5oxily11S5nsCedU0jKzKKzo,11338
|
43
|
+
traffic_taffy-0.8.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|