traffic-taffy 0.5.8__py3-none-any.whl → 0.6.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 +86 -54
- traffic_taffy/comparison.py +13 -5
- traffic_taffy/dissection.py +31 -17
- traffic_taffy/dissectmany.py +52 -27
- traffic_taffy/dissector.py +22 -1
- traffic_taffy/dissector_engine/__init__.py +24 -1
- traffic_taffy/dissector_engine/dnstap.py +121 -0
- traffic_taffy/dissector_engine/dpkt.py +207 -41
- traffic_taffy/dissector_engine/scapy.py +27 -32
- traffic_taffy/graph.py +22 -13
- traffic_taffy/output/__init__.py +36 -20
- traffic_taffy/output/console.py +32 -17
- traffic_taffy/output/fsdb.py +17 -12
- traffic_taffy/output/memory.py +23 -16
- traffic_taffy/tests/test_compare_results.py +37 -37
- traffic_taffy/tests/test_dpkt_engine.py +15 -0
- traffic_taffy/tests/test_pcap_dissector.py +4 -4
- traffic_taffy/tests/test_pcap_splitter.py +0 -1
- traffic_taffy/tools/cache_info.py +10 -7
- traffic_taffy/tools/compare.py +10 -16
- traffic_taffy/tools/dissect.py +8 -6
- traffic_taffy/tools/explore.py +20 -46
- traffic_taffy/tools/graph.py +6 -5
- {traffic_taffy-0.5.8.dist-info → traffic_taffy-0.6.1.dist-info}/METADATA +11 -2
- traffic_taffy-0.6.1.dist-info/RECORD +35 -0
- traffic_taffy-0.6.1.dist-info/licenses/LICENSE.txt +204 -0
- traffic_taffy/dissectorresults.py +0 -21
- traffic_taffy/tests/test_result_storage.py +0 -16
- traffic_taffy-0.5.8.dist-info/RECORD +0 -34
- {traffic_taffy-0.5.8.dist-info → traffic_taffy-0.6.1.dist-info}/WHEEL +0 -0
- {traffic_taffy-0.5.8.dist-info → traffic_taffy-0.6.1.dist-info}/entry_points.txt +0 -0
traffic_taffy/tools/explore.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
"""A graphical PCAP comparison and graphing tool."""
|
2
|
+
|
1
3
|
import sys
|
2
4
|
from os.path import basename
|
3
5
|
import logging
|
4
6
|
from logging import debug
|
5
7
|
from datetime import datetime
|
6
8
|
import datetime as dt
|
7
|
-
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
|
9
|
+
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, Namespace
|
8
10
|
from traffic_taffy.dissector import (
|
9
11
|
dissector_add_parseargs,
|
10
12
|
limitor_add_parseargs,
|
@@ -38,27 +40,31 @@ from PyQt6.QtWidgets import (
|
|
38
40
|
QMenu,
|
39
41
|
QCheckBox,
|
40
42
|
)
|
43
|
+
from typing import Optional
|
41
44
|
|
42
45
|
|
43
46
|
class CallWithParameter:
|
44
|
-
|
47
|
+
"""A callable object that takes parameters."""
|
48
|
+
|
49
|
+
def __init__(self, function: callable, *args: list):
|
50
|
+
"""Create a Callable object."""
|
45
51
|
self.parameters = args
|
46
52
|
self.function = function
|
47
53
|
|
48
54
|
def __call__(self):
|
55
|
+
"""Call a registered callback routine and its parameters."""
|
49
56
|
self.function(*self.parameters)
|
50
57
|
|
51
58
|
|
52
59
|
class TaffyExplorer(QDialog, PcapGraphData):
|
53
|
-
"""Explore PCAP files by comparison slices"""
|
60
|
+
"""Explore PCAP files by comparison slices."""
|
54
61
|
|
55
62
|
def testplot(self, area):
|
56
63
|
print(area)
|
57
|
-
# self.traffic_graph.setPlotArea(area)
|
58
|
-
# self.detail_graph.setPlotArea(area)
|
59
64
|
self.traffic_graph.zoomIn(area)
|
60
65
|
|
61
66
|
def __init__(self, args):
|
67
|
+
"""Create a TaffyExplorer UI."""
|
62
68
|
super().__init__()
|
63
69
|
|
64
70
|
self.mainLayout = QVBoxLayout()
|
@@ -70,7 +76,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
70
76
|
self.detail_graph_view.setRubberBand(QChartView.RubberBand.RectangleRubberBand)
|
71
77
|
self.detail_graph.setMinimumSize(1000, 400)
|
72
78
|
# this is the screen space not the zoom setting
|
73
|
-
# self.detail_graph.plotAreaChanged.connect(self.testplot)
|
74
79
|
self.mainLayout.addWidget(self.detail_graph_view)
|
75
80
|
|
76
81
|
# create the mini graph next
|
@@ -106,10 +111,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
106
111
|
self.mainLayout.addWidget(self.quit_button)
|
107
112
|
self.quit_button.clicked.connect(self.quit)
|
108
113
|
|
109
|
-
# self.tree = QTreeWidget()
|
110
|
-
# self.tree.setHeaderHidden(True)
|
111
|
-
# self.tree.setIndentation(0)
|
112
|
-
|
113
114
|
self.args = args
|
114
115
|
|
115
116
|
self.only_positive = args.only_positive
|
@@ -145,7 +146,7 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
145
146
|
self.chart_column = "count"
|
146
147
|
|
147
148
|
def quit(self):
|
148
|
-
exit()
|
149
|
+
sys.exit()
|
149
150
|
|
150
151
|
def create_initial_comparison_report_arguments(self):
|
151
152
|
if len(self.dissections) == 1:
|
@@ -173,9 +174,12 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
173
174
|
cache_results=self.args.cache_pcap_results,
|
174
175
|
cache_file_suffix=self.args.cache_file_suffix,
|
175
176
|
dissection_level=self.args.dissection_level,
|
176
|
-
between_times=self.args.between_times,
|
177
|
+
# between_times=self.args.between_times,
|
177
178
|
bin_size=self.args.bin_size,
|
178
|
-
pcap_filter=self.
|
179
|
+
pcap_filter=self.args.filter,
|
180
|
+
layers=self.args.layers,
|
181
|
+
force_load=self.args.force_load,
|
182
|
+
force_overwrite=self.args.force_overwrite,
|
179
183
|
)
|
180
184
|
|
181
185
|
# create the graph data storage
|
@@ -196,7 +200,7 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
196
200
|
chart: QChart,
|
197
201
|
match_string: str,
|
198
202
|
match_value: str | None = None,
|
199
|
-
chart_column: str = None,
|
203
|
+
chart_column: Optional[str] = None,
|
200
204
|
):
|
201
205
|
self.match_string = match_string
|
202
206
|
self.match_value = match_value
|
@@ -230,8 +234,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
230
234
|
series.setName(df["subkey"][index])
|
231
235
|
series.setOpacity(0.5)
|
232
236
|
series_set.append(series)
|
233
|
-
# axisx = QDateTimeAxis()
|
234
|
-
# chart.setAxisX()
|
235
237
|
|
236
238
|
if len(df) == 0:
|
237
239
|
return # TODO: handle displaying an error
|
@@ -247,8 +249,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
247
249
|
first_time = timestamps[1] # skip the leading 0 timestamp
|
248
250
|
last_time = timestamps[-1]
|
249
251
|
|
250
|
-
# maxv = max(dict(dissection.data.values()))
|
251
|
-
|
252
252
|
# tick-height:
|
253
253
|
tick_height = int(0.01 * maxv)
|
254
254
|
|
@@ -261,9 +261,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
261
261
|
series.setName(dissection.pcap_file)
|
262
262
|
series.setColor(grey)
|
263
263
|
series_set.append(series)
|
264
|
-
# chart.addSeries(series)
|
265
|
-
# series.attachAxis(axisX)
|
266
|
-
# series.attachAxis(axisY)
|
267
264
|
|
268
265
|
# beginning end markers
|
269
266
|
series = QLineSeries()
|
@@ -273,11 +270,7 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
273
270
|
series.setMarkerSize(20)
|
274
271
|
triangle = QImage("images/grey_triangle.png").scaled(10, 10)
|
275
272
|
series.setLightMarker(triangle)
|
276
|
-
# series.setColor(grey)
|
277
273
|
series_set.append(series)
|
278
|
-
# chart.addSeries(series)
|
279
|
-
# series.attachAxis(axisX)
|
280
|
-
# series.attachAxis(axisY)
|
281
274
|
|
282
275
|
# we always add the real data last to keep file name coloring consistent
|
283
276
|
|
@@ -286,7 +279,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
286
279
|
self.axisX = QDateTimeAxis()
|
287
280
|
self.axisX.setTickCount(5)
|
288
281
|
self.axisX.setFormat("yyyy-MM-dd\nhh:mm")
|
289
|
-
# self.axisX.setLabelsAngle(-45)
|
290
282
|
chart.addAxis(self.axisX, Qt.AlignmentFlag.AlignBottom)
|
291
283
|
|
292
284
|
if self.axisY:
|
@@ -302,16 +294,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
302
294
|
series.attachAxis(self.axisX)
|
303
295
|
series.attachAxis(self.axisY)
|
304
296
|
|
305
|
-
# series = QLineSeries()
|
306
|
-
# series.append(first_time, 0)
|
307
|
-
# series.append(first_time, maxv)
|
308
|
-
# series.attachAxis(axisX)
|
309
|
-
# series.attachAxis(axisY)
|
310
|
-
# chart.addSeries(series)
|
311
|
-
|
312
|
-
# chart.createDefaultAxes()
|
313
|
-
# chart.zoomIn(QRectF(QPointF(first_time/1000.0, maxv), QPointF(last_time/1000.0, 0)))
|
314
|
-
|
315
297
|
self.saved_df = df
|
316
298
|
self.minimum_count = tmpv
|
317
299
|
|
@@ -376,20 +358,14 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
376
358
|
# def clearGridLayout(layout, deleteWidgets: bool = True):
|
377
359
|
|
378
360
|
# for widget in layout.something():
|
379
|
-
# layout.removeWidget(widget)
|
380
|
-
# widget.deletLater()
|
381
361
|
|
382
362
|
# while (QLayoutItem* item = layout->takeAt(0))
|
383
363
|
|
384
364
|
# if (deleteWidgets)
|
385
|
-
# {
|
386
365
|
# if (QWidget* widget = item->widget())
|
387
366
|
# widget->deleteLater();
|
388
|
-
# }
|
389
367
|
# if (QLayout* childLayout = item->layout())
|
390
|
-
# clearLayout(childLayout, deleteWidgets);
|
391
368
|
# delete item;
|
392
|
-
# }
|
393
369
|
|
394
370
|
def set_left_dissection(self, action):
|
395
371
|
self.left_w.setText(basename(action.text()))
|
@@ -517,8 +493,7 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
517
493
|
|
518
494
|
def update_report(self):
|
519
495
|
# TODO: less duplication with this and compare:print_report()
|
520
|
-
"
|
521
|
-
|
496
|
+
"Fills in the grid table showing the differences from a saved report."
|
522
497
|
old_widget = self.comparison_panel_w
|
523
498
|
|
524
499
|
# add a new one
|
@@ -592,7 +567,6 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
592
567
|
debug(f" adding {subkey}")
|
593
568
|
|
594
569
|
subkey_button = QPushButton(" " + subkey)
|
595
|
-
# subkey_button.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
596
570
|
subkey_button.clicked.connect(
|
597
571
|
CallWithParameter(self.update_detail_chart, key, subkey)
|
598
572
|
)
|
@@ -636,7 +610,7 @@ class TaffyExplorer(QDialog, PcapGraphData):
|
|
636
610
|
(self.match_string, self.match_value) = (tmp_key, tmp_value)
|
637
611
|
|
638
612
|
|
639
|
-
def parse_args():
|
613
|
+
def parse_args() -> Namespace:
|
640
614
|
"Parse the command line arguments."
|
641
615
|
parser = ArgumentParser(
|
642
616
|
formatter_class=ArgumentDefaultsHelpFormatter,
|
traffic_taffy/tools/graph.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
"""Read a PCAP file and graph it or parts of it"""
|
1
|
+
"""Read a PCAP file and graph it or parts of it."""
|
2
2
|
|
3
|
-
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
|
3
|
+
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, Namespace
|
4
4
|
from traffic_taffy.graph import PcapGraph
|
5
5
|
from traffic_taffy.dissector import (
|
6
6
|
dissector_add_parseargs,
|
@@ -10,8 +10,8 @@ from traffic_taffy.dissector import (
|
|
10
10
|
import logging
|
11
11
|
|
12
12
|
|
13
|
-
def parse_args():
|
14
|
-
"Parse the command line arguments."
|
13
|
+
def parse_args() -> Namespace:
|
14
|
+
"""Parse the command line arguments."""
|
15
15
|
parser = ArgumentParser(
|
16
16
|
formatter_class=ArgumentDefaultsHelpFormatter,
|
17
17
|
description=__doc__,
|
@@ -59,7 +59,8 @@ def parse_args():
|
|
59
59
|
return args
|
60
60
|
|
61
61
|
|
62
|
-
def main():
|
62
|
+
def main() -> None:
|
63
|
+
"""Run taffy-graph."""
|
63
64
|
args = parse_args()
|
64
65
|
|
65
66
|
check_dissector_level(args.dissection_level)
|
@@ -1,9 +1,10 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: traffic-taffy
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.1
|
4
4
|
Summary: A tool for doing differential analysis of pcap files
|
5
|
-
Project-URL: Homepage, https://github.
|
5
|
+
Project-URL: Homepage, https://traffic-taffy.github.io/
|
6
6
|
Author-email: Wes Hardaker <opensource@hardakers.net>
|
7
|
+
License-File: LICENSE.txt
|
7
8
|
Classifier: Operating System :: OS Independent
|
8
9
|
Classifier: Programming Language :: Python :: 3
|
9
10
|
Requires-Python: >=3.7
|
@@ -40,6 +41,14 @@ This tool is designed to do just that.
|
|
40
41
|
See the online [readthedocs
|
41
42
|
documentation](https://traffic-taffy.readthedocs.io/).
|
42
43
|
|
44
|
+
## Development
|
45
|
+
|
46
|
+
Traffic-taffy is under very rapid development with a fair amount of
|
47
|
+
refactoring as time goes on into better class architectures. If you
|
48
|
+
are considering looking at portions of the code and submitting pull
|
49
|
+
requests, please reach out to Wes ahead of time to check what changes
|
50
|
+
might be coming that will cause merge conflicts.
|
51
|
+
|
43
52
|
# Copyright and License
|
44
53
|
|
45
54
|
This project is copyrighted by the University of Southern California,
|
@@ -0,0 +1,35 @@
|
|
1
|
+
traffic_taffy/__init__.py,sha256=lxdAZkWGZaopH508YDIVWmijx9OX55PA86SnLr2-l6w,22
|
2
|
+
traffic_taffy/compare.py,sha256=VwwxfJUYMXSVByX4HTAk3IoQz5yxBUzcWYw36f5bj4s,11855
|
3
|
+
traffic_taffy/comparison.py,sha256=MmCxK7E3RbVLS8gJ_JJOdqa2MHQ7np1Pq_VB0Scir8U,933
|
4
|
+
traffic_taffy/dissection.py,sha256=k30Jv11UzgdnUYU7b-fkW12yHEY1DK2uM7ZBqR2XNkw,17141
|
5
|
+
traffic_taffy/dissectmany.py,sha256=M3myhPiatVLJrINAuHkX4bx9X7rhpJy37T_H7p1TI8w,4394
|
6
|
+
traffic_taffy/dissector.py,sha256=i2NyObydENhp11FEnLG37sLt3jn0qmC_UXnxKQ2ez9Y,10571
|
7
|
+
traffic_taffy/graph.py,sha256=Jj5Ga43I-zbetGjAIT-rzuEHr_ZZwFhGP76vkEgwNmg,4384
|
8
|
+
traffic_taffy/graphdata.py,sha256=lHpLuzzypEPuz3QPfkvs0IAbplTLzKcqHaLyoRidmiE,2971
|
9
|
+
traffic_taffy/dissector_engine/__init__.py,sha256=6oSFCCHTjQRqKqCyM6Gd2kWH0Ay3ljfJfnW7meMbE8M,2057
|
10
|
+
traffic_taffy/dissector_engine/dnstap.py,sha256=nEpUh0_PsnTMeNxK788HPw70F6eqBMzHoHcX3FiFl1M,4930
|
11
|
+
traffic_taffy/dissector_engine/dpkt.py,sha256=l-0hmo4fBl6rXtaRGz-4_E8hZwogZp_tm54w3pYxiK8,12500
|
12
|
+
traffic_taffy/dissector_engine/scapy.py,sha256=HhGflNBVfdokADQDPRx4FCHluVQoyZpNV6tE5qbcuBk,3774
|
13
|
+
traffic_taffy/output/__init__.py,sha256=dSpW9xDno3nKaYOwThS2fVkcIHJVAJE9DlEiLfdHXfg,4555
|
14
|
+
traffic_taffy/output/console.py,sha256=Ziq4MKtzSdP9oVaZrWHiw0Bpsm2Dj9QFLJtDK38mxaY,2911
|
15
|
+
traffic_taffy/output/fsdb.py,sha256=po--ldHeRPTXVTkP68qtI_BYV2cEOab-kFVWv0ymj5M,1704
|
16
|
+
traffic_taffy/output/memory.py,sha256=86tgJ-jMt3UVX31eP6U02YbbYRoqbYhhR4kXJQmYzO4,1870
|
17
|
+
traffic_taffy/tests/test_compare_results.py,sha256=aUxy6UdtGhWJYNuQn8_UzkPRQpbEfzKXWz7DShpmRG4,1832
|
18
|
+
traffic_taffy/tests/test_dict_merge.py,sha256=t3rZSQQ0AlBxRKfLborx9SxYN53cCAQQzZ2w-__WT2Y,1429
|
19
|
+
traffic_taffy/tests/test_dpkt_engine.py,sha256=512Wfq7D1qVkfhGwf1u2QSgZooWqZQWV9L4OhpAr4AE,489
|
20
|
+
traffic_taffy/tests/test_normalize.py,sha256=k5y3XmYitnF1aTkB-9dZ7WZPQB__l_iEzC6atKKywfw,2601
|
21
|
+
traffic_taffy/tests/test_pcap_dissector.py,sha256=sxJJ3seO9pjzilM0b6iu_ggQbUI4E7WbMFdwm4m9Gz0,2027
|
22
|
+
traffic_taffy/tests/test_pcap_splitter.py,sha256=Pjv2CS_WXqK1wQ1rdsxLU-M1Z5fuHsciEhiDJpujFnI,2568
|
23
|
+
traffic_taffy/tests/test_value_printing.py,sha256=3k-d1bpa6tD8qcrgNVoZhhG7kwylI2AMVNFPbRE2vds,266
|
24
|
+
traffic_taffy/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
+
traffic_taffy/tools/cache_info.py,sha256=N4L-xjO3i-p3QD5DIytSt3GBnT4JsJh3V2dl5Tktumk,2084
|
26
|
+
traffic_taffy/tools/compare.py,sha256=mVChkw56pzU6HCY67pNSI7qrlaU5N65BdLoP8upmsXU,3395
|
27
|
+
traffic_taffy/tools/dissect.py,sha256=1-b6fnIE3DPJ2xvsImPrVynKPwerQU0PrYvaMJC85ZA,3420
|
28
|
+
traffic_taffy/tools/explore.py,sha256=TEUqfiknqKwEq0zswfgwvKPLMSOlTUWqC8NhcwPfQO8,24146
|
29
|
+
traffic_taffy/tools/export.py,sha256=jk5ck-K9m9_Rno72fDWgfS67WKUumDL1KQpMG_j0-G8,2682
|
30
|
+
traffic_taffy/tools/graph.py,sha256=5pcO_FsASddi_zEYB9h24syuqLCaDzByIPAiR4aq6gg,2530
|
31
|
+
traffic_taffy-0.6.1.dist-info/METADATA,sha256=HZBn_vZuMg-mBkNm-bX_c3wURdNS5N80Z9x35padlPk,1884
|
32
|
+
traffic_taffy-0.6.1.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
33
|
+
traffic_taffy-0.6.1.dist-info/entry_points.txt,sha256=ySz30b1Cu03CtCGMRqqg0NZJpzrVI91T5HjbEaTNnpQ,314
|
34
|
+
traffic_taffy-0.6.1.dist-info/licenses/LICENSE.txt,sha256=hiV1DJgDQeSM1r7P-ez5oxily11S5nsCedU0jKzKKzo,11338
|
35
|
+
traffic_taffy-0.6.1.dist-info/RECORD,,
|
@@ -0,0 +1,204 @@
|
|
1
|
+
Copyright 2023-2024 USC/ISI
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
The Apache 2.0 LICENSE:
|
17
|
+
|
18
|
+
Apache License
|
19
|
+
Version 2.0, January 2004
|
20
|
+
http://www.apache.org/licenses/
|
21
|
+
|
22
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
23
|
+
|
24
|
+
1. Definitions.
|
25
|
+
|
26
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
27
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
28
|
+
|
29
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
30
|
+
the copyright owner that is granting the License.
|
31
|
+
|
32
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
33
|
+
other entities that control, are controlled by, or are under common
|
34
|
+
control with that entity. For the purposes of this definition,
|
35
|
+
"control" means (i) the power, direct or indirect, to cause the
|
36
|
+
direction or management of such entity, whether by contract or
|
37
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
38
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
39
|
+
|
40
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
41
|
+
exercising permissions granted by this License.
|
42
|
+
|
43
|
+
"Source" form shall mean the preferred form for making modifications,
|
44
|
+
including but not limited to software source code, documentation
|
45
|
+
source, and configuration files.
|
46
|
+
|
47
|
+
"Object" form shall mean any form resulting from mechanical
|
48
|
+
transformation or translation of a Source form, including but
|
49
|
+
not limited to compiled object code, generated documentation,
|
50
|
+
and conversions to other media types.
|
51
|
+
|
52
|
+
"Work" shall mean the work of authorship, whether in Source or
|
53
|
+
Object form, made available under the License, as indicated by a
|
54
|
+
copyright notice that is included in or attached to the work
|
55
|
+
(an example is provided in the Appendix below).
|
56
|
+
|
57
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
58
|
+
form, that is based on (or derived from) the Work and for which the
|
59
|
+
editorial revisions, annotations, elaborations, or other modifications
|
60
|
+
represent, as a whole, an original work of authorship. For the purposes
|
61
|
+
of this License, Derivative Works shall not include works that remain
|
62
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
63
|
+
the Work and Derivative Works thereof.
|
64
|
+
|
65
|
+
"Contribution" shall mean any work of authorship, including
|
66
|
+
the original version of the Work and any modifications or additions
|
67
|
+
to that Work or Derivative Works thereof, that is intentionally
|
68
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
69
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
70
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
71
|
+
means any form of electronic, verbal, or written communication sent
|
72
|
+
to the Licensor or its representatives, including but not limited to
|
73
|
+
communication on electronic mailing lists, source code control systems,
|
74
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
75
|
+
Licensor for the purpose of discussing and improving the Work, but
|
76
|
+
excluding communication that is conspicuously marked or otherwise
|
77
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
78
|
+
|
79
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
80
|
+
on behalf of whom a Contribution has been received by Licensor and
|
81
|
+
subsequently incorporated within the Work.
|
82
|
+
|
83
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
84
|
+
this License, each Contributor hereby grants to You a perpetual,
|
85
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
86
|
+
copyright license to reproduce, prepare Derivative Works of,
|
87
|
+
publicly display, publicly perform, sublicense, and distribute the
|
88
|
+
Work and such Derivative Works in Source or Object form.
|
89
|
+
|
90
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
91
|
+
this License, each Contributor hereby grants to You a perpetual,
|
92
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
93
|
+
(except as stated in this section) patent license to make, have made,
|
94
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
95
|
+
where such license applies only to those patent claims licensable
|
96
|
+
by such Contributor that are necessarily infringed by their
|
97
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
98
|
+
with the Work to which such Contribution(s) was submitted. If You
|
99
|
+
institute patent litigation against any entity (including a
|
100
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
101
|
+
or a Contribution incorporated within the Work constitutes direct
|
102
|
+
or contributory patent infringement, then any patent licenses
|
103
|
+
granted to You under this License for that Work shall terminate
|
104
|
+
as of the date such litigation is filed.
|
105
|
+
|
106
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
107
|
+
Work or Derivative Works thereof in any medium, with or without
|
108
|
+
modifications, and in Source or Object form, provided that You
|
109
|
+
meet the following conditions:
|
110
|
+
|
111
|
+
(a) You must give any other recipients of the Work or
|
112
|
+
Derivative Works a copy of this License; and
|
113
|
+
|
114
|
+
(b) You must cause any modified files to carry prominent notices
|
115
|
+
stating that You changed the files; and
|
116
|
+
|
117
|
+
(c) You must retain, in the Source form of any Derivative Works
|
118
|
+
that You distribute, all copyright, patent, trademark, and
|
119
|
+
attribution notices from the Source form of the Work,
|
120
|
+
excluding those notices that do not pertain to any part of
|
121
|
+
the Derivative Works; and
|
122
|
+
|
123
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
124
|
+
distribution, then any Derivative Works that You distribute must
|
125
|
+
include a readable copy of the attribution notices contained
|
126
|
+
within such NOTICE file, excluding those notices that do not
|
127
|
+
pertain to any part of the Derivative Works, in at least one
|
128
|
+
of the following places: within a NOTICE text file distributed
|
129
|
+
as part of the Derivative Works; within the Source form or
|
130
|
+
documentation, if provided along with the Derivative Works; or,
|
131
|
+
within a display generated by the Derivative Works, if and
|
132
|
+
wherever such third-party notices normally appear. The contents
|
133
|
+
of the NOTICE file are for informational purposes only and
|
134
|
+
do not modify the License. You may add Your own attribution
|
135
|
+
notices within Derivative Works that You distribute, alongside
|
136
|
+
or as an addendum to the NOTICE text from the Work, provided
|
137
|
+
that such additional attribution notices cannot be construed
|
138
|
+
as modifying the License.
|
139
|
+
|
140
|
+
You may add Your own copyright statement to Your modifications and
|
141
|
+
may provide additional or different license terms and conditions
|
142
|
+
for use, reproduction, or distribution of Your modifications, or
|
143
|
+
for any such Derivative Works as a whole, provided Your use,
|
144
|
+
reproduction, and distribution of the Work otherwise complies with
|
145
|
+
the conditions stated in this License.
|
146
|
+
|
147
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
148
|
+
any Contribution intentionally submitted for inclusion in the Work
|
149
|
+
by You to the Licensor shall be under the terms and conditions of
|
150
|
+
this License, without any additional terms or conditions.
|
151
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
152
|
+
the terms of any separate license agreement you may have executed
|
153
|
+
with Licensor regarding such Contributions.
|
154
|
+
|
155
|
+
6. Trademarks. This License does not grant permission to use the trade
|
156
|
+
names, trademarks, service marks, or product names of the Licensor,
|
157
|
+
except as required for reasonable and customary use in describing the
|
158
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
159
|
+
|
160
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
161
|
+
agreed to in writing, Licensor provides the Work (and each
|
162
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
163
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
164
|
+
implied, including, without limitation, any warranties or conditions
|
165
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
166
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
167
|
+
appropriateness of using or redistributing the Work and assume any
|
168
|
+
risks associated with Your exercise of permissions under this License.
|
169
|
+
|
170
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
171
|
+
whether in tort (including negligence), contract, or otherwise,
|
172
|
+
unless required by applicable law (such as deliberate and grossly
|
173
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
174
|
+
liable to You for damages, including any direct, indirect, special,
|
175
|
+
incidental, or consequential damages of any character arising as a
|
176
|
+
result of this License or out of the use or inability to use the
|
177
|
+
Work (including but not limited to damages for loss of goodwill,
|
178
|
+
work stoppage, computer failure or malfunction, or any and all
|
179
|
+
other commercial damages or losses), even if such Contributor
|
180
|
+
has been advised of the possibility of such damages.
|
181
|
+
|
182
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
183
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
184
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
185
|
+
or other liability obligations and/or rights consistent with this
|
186
|
+
License. However, in accepting such obligations, You may act only
|
187
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
188
|
+
of any other Contributor, and only if You agree to indemnify,
|
189
|
+
defend, and hold each Contributor harmless for any liability
|
190
|
+
incurred by, or claims asserted against, such Contributor by reason
|
191
|
+
of your accepting any such warranty or additional liability.
|
192
|
+
|
193
|
+
END OF TERMS AND CONDITIONS
|
194
|
+
|
195
|
+
APPENDIX: How to apply the Apache License to your work.
|
196
|
+
|
197
|
+
To apply the Apache License to your work, attach the following
|
198
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
199
|
+
replaced with your own identifying information. (Don't include
|
200
|
+
the brackets!) The text should be enclosed in the appropriate
|
201
|
+
comment syntax for the file format. We also recommend that a
|
202
|
+
file or class name and description of purpose be included on the
|
203
|
+
same "printed page" as the copyright notice for easier
|
204
|
+
identification within third-party archives.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
from collections import defaultdict, Counter
|
2
|
-
|
3
|
-
|
4
|
-
class DefaultCounter(Counter):
|
5
|
-
def __init__(self, *args, default_key: str = "total", **kargs):
|
6
|
-
super().__init__(*args, **kargs)
|
7
|
-
self.default_key = default_key
|
8
|
-
|
9
|
-
def __iadd__(self, value):
|
10
|
-
self[self.default_key] += value
|
11
|
-
return self
|
12
|
-
|
13
|
-
def __eq__(self, value):
|
14
|
-
return self[self.default_key] == value
|
15
|
-
|
16
|
-
|
17
|
-
class DissectorResults(defaultdict):
|
18
|
-
def __init__(self, has_delta: bool = False, default_key: str = "total"):
|
19
|
-
super().__init__(lambda: defaultdict(DefaultCounter))
|
20
|
-
self.has_delta = has_delta
|
21
|
-
self.default_key = default_key
|
@@ -1,16 +0,0 @@
|
|
1
|
-
from traffic_taffy.dissectorresults import DissectorResults
|
2
|
-
|
3
|
-
|
4
|
-
def test_dissector_results_isa():
|
5
|
-
A = DissectorResults()
|
6
|
-
assert isinstance(A, DissectorResults) is True
|
7
|
-
|
8
|
-
|
9
|
-
def test_dissector_results_storage():
|
10
|
-
A = DissectorResults()
|
11
|
-
A["a"]["b"] = 4
|
12
|
-
A["c"]["d"] += 1
|
13
|
-
A["c"]["d"] += 1
|
14
|
-
|
15
|
-
assert A["a"]["b"] == 4
|
16
|
-
assert A["c"]["d"] == 2
|
@@ -1,34 +0,0 @@
|
|
1
|
-
traffic_taffy/__init__.py,sha256=h_MAFzg4LQJlfh9BH4gRBZtj2rrXiZwsltS5yEfy00s,22
|
2
|
-
traffic_taffy/compare.py,sha256=V4QR2pnaqMuAyg4t4tCX-e8leFX1LIDQdalUJWJwOes,10890
|
3
|
-
traffic_taffy/comparison.py,sha256=goGJbJsr8mzMqRvrJOXxW9QJaLZUg4W85Ji7Bjl-UKA,583
|
4
|
-
traffic_taffy/dissection.py,sha256=nA_IKAHHV6ia_RJAo44DIMIStS-SSKqrR1NnD4qbU8E,16712
|
5
|
-
traffic_taffy/dissectmany.py,sha256=hbCX-AEMTquTaqTpb05D8ek5dS5z9nr28BC5e27mzo8,3403
|
6
|
-
traffic_taffy/dissector.py,sha256=dg4bP6FgeXkIUfML1wLVaQsXqkAK-cx4Eir3zMMZ3wo,9636
|
7
|
-
traffic_taffy/dissectorresults.py,sha256=LKoyX04Qjc6B7RnqtJgIWsyVnselJ9CygLkMAp3lhw0,647
|
8
|
-
traffic_taffy/graph.py,sha256=UxRQRnv8WuwjFt_hesk4B31-I2fUnAJlLzM5pHvrNus,3996
|
9
|
-
traffic_taffy/graphdata.py,sha256=lHpLuzzypEPuz3QPfkvs0IAbplTLzKcqHaLyoRidmiE,2971
|
10
|
-
traffic_taffy/dissector_engine/__init__.py,sha256=vEMf589m4JutbfyX8HEGi1O50tNqCBqASAqYyyYg2sI,1284
|
11
|
-
traffic_taffy/dissector_engine/dpkt.py,sha256=uby0j6LFCjnxQvyR2APhKKtydKJmHV6ANn1oODRyIPo,4256
|
12
|
-
traffic_taffy/dissector_engine/scapy.py,sha256=BxKdU2mptXh4iIRgxznNsl1eIJve_b76Tq8XkunBKR4,3909
|
13
|
-
traffic_taffy/output/__init__.py,sha256=KiyKW-J7RXeguOM4vwuhcnuAjxl2kQ5t4MYLA0IeayM,3963
|
14
|
-
traffic_taffy/output/console.py,sha256=me-BPAHwgqvl5tS-EvHmEPUEt6ryn0Rcj76lfGJazSc,2315
|
15
|
-
traffic_taffy/output/fsdb.py,sha256=c_XwjPdLcl85MZwBY7VgbPymqDZje8St_HmyJl_9LFU,1449
|
16
|
-
traffic_taffy/output/memory.py,sha256=McYpPbg4kux_U21OabE4lUhrgT60V0eKUiey0Udzc9s,1502
|
17
|
-
traffic_taffy/tests/test_compare_results.py,sha256=wawpJ_X9HOVq5-a_q4jP6_PPNfWh-gogeNHKpD_ucdA,1884
|
18
|
-
traffic_taffy/tests/test_dict_merge.py,sha256=t3rZSQQ0AlBxRKfLborx9SxYN53cCAQQzZ2w-__WT2Y,1429
|
19
|
-
traffic_taffy/tests/test_normalize.py,sha256=k5y3XmYitnF1aTkB-9dZ7WZPQB__l_iEzC6atKKywfw,2601
|
20
|
-
traffic_taffy/tests/test_pcap_dissector.py,sha256=jAGzOaj3Y-bjUeHhFuzM4FGXlG83S5Y45hAorJCDLxE,2001
|
21
|
-
traffic_taffy/tests/test_pcap_splitter.py,sha256=0RxIgH9vWMeFoyC2A6sIIGFcq_Jcl_RhH9FHgkjayTU,2643
|
22
|
-
traffic_taffy/tests/test_result_storage.py,sha256=gxKO7Wc0klgSQSk3bw8L3sW_kdxoRltLzmcXqycFdoU,360
|
23
|
-
traffic_taffy/tests/test_value_printing.py,sha256=3k-d1bpa6tD8qcrgNVoZhhG7kwylI2AMVNFPbRE2vds,266
|
24
|
-
traffic_taffy/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
-
traffic_taffy/tools/cache_info.py,sha256=QC-BiaJ_uHwH-B05a29qdW7oTHfKmO1PT31d_FvIJlU,1965
|
26
|
-
traffic_taffy/tools/compare.py,sha256=tJW5PZHpbiFN5YlIu3IIz6vkFowYuxhgmWVO9JAJ4Co,3438
|
27
|
-
traffic_taffy/tools/dissect.py,sha256=QST4NlH1HbzepJLAHFlghm47MDBd0CHBjquRnqqs_SY,3276
|
28
|
-
traffic_taffy/tools/explore.py,sha256=HWyRWc0GpK0jpoVyGqkeFyqSwVE9NLxGh4r4iW7HLYM,24968
|
29
|
-
traffic_taffy/tools/export.py,sha256=jk5ck-K9m9_Rno72fDWgfS67WKUumDL1KQpMG_j0-G8,2682
|
30
|
-
traffic_taffy/tools/graph.py,sha256=gcyI0C8E21Uuon3j_n58tV-kKSn8wXjov-JSCKjPukI,2466
|
31
|
-
traffic_taffy-0.5.8.dist-info/METADATA,sha256=T9mOjOILnSNlNSTcKWt2upceGamAY07P8OWrgZ1HLhY,1526
|
32
|
-
traffic_taffy-0.5.8.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
33
|
-
traffic_taffy-0.5.8.dist-info/entry_points.txt,sha256=ySz30b1Cu03CtCGMRqqg0NZJpzrVI91T5HjbEaTNnpQ,314
|
34
|
-
traffic_taffy-0.5.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|