traffic-taffy 0.9.7__py3-none-any.whl → 0.9.8__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/output/console.py +6 -0
- traffic_taffy/reports/compareslicesreport.py +2 -2
- traffic_taffy/reports/correlationchangereport.py +2 -2
- traffic_taffy/reports/correlationreport.py +2 -2
- {traffic_taffy-0.9.7.dist-info → traffic_taffy-0.9.8.dist-info}/METADATA +1 -1
- {traffic_taffy-0.9.7.dist-info → traffic_taffy-0.9.8.dist-info}/RECORD +10 -12
- traffic_taffy/report.py +0 -12
- traffic_taffy/tests/test_dpkt_engine.py +0 -15
- {traffic_taffy-0.9.7.dist-info → traffic_taffy-0.9.8.dist-info}/WHEEL +0 -0
- {traffic_taffy-0.9.7.dist-info → traffic_taffy-0.9.8.dist-info}/entry_points.txt +0 -0
- {traffic_taffy-0.9.7.dist-info → traffic_taffy-0.9.8.dist-info}/licenses/LICENSE.txt +0 -0
traffic_taffy/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__VERSION__ = "0.9.
|
1
|
+
__VERSION__ = "0.9.8"
|
traffic_taffy/output/console.py
CHANGED
@@ -65,6 +65,7 @@ class Console(Output):
|
|
65
65
|
def output_record(self, key: str, subkey: Any, data: Dict[str, Any]) -> None:
|
66
66
|
"""Print a report to the console."""
|
67
67
|
|
68
|
+
marker = " "
|
68
69
|
style = ""
|
69
70
|
endstyle = ""
|
70
71
|
if getattr(data, "delta_percentage", None):
|
@@ -73,12 +74,16 @@ class Console(Output):
|
|
73
74
|
# apply some styling depending on range
|
74
75
|
if delta_percentage < -Console.BOLD_LIMIT:
|
75
76
|
style = "[bold red]"
|
77
|
+
marker = "v"
|
76
78
|
elif delta_percentage < Console.POSITIVE:
|
77
79
|
style = "[red]"
|
80
|
+
marker = "v"
|
78
81
|
elif delta_percentage > Console.BOLD_LIMIT:
|
79
82
|
style = "[bold green]"
|
83
|
+
marker = "^"
|
80
84
|
elif delta_percentage > Console.POSITIVE:
|
81
85
|
style = "[green]"
|
86
|
+
marker = "^"
|
82
87
|
endstyle = style.replace("[", "[/")
|
83
88
|
|
84
89
|
# construct the output line with styling
|
@@ -92,6 +97,7 @@ class Console(Output):
|
|
92
97
|
style=style,
|
93
98
|
endstyle=endstyle,
|
94
99
|
subkey=subkey,
|
100
|
+
marker=marker,
|
95
101
|
**field_values,
|
96
102
|
)
|
97
103
|
|
@@ -34,7 +34,7 @@ class CompareSlicesReport(Report):
|
|
34
34
|
@property
|
35
35
|
def header_string(self) -> str:
|
36
36
|
"""Header string."""
|
37
|
-
line = " {style}{subkey:<50}{endstyle}"
|
37
|
+
line = " {style} {subkey:<50}{endstyle}"
|
38
38
|
line += " {left_count:>8} {right_count:>8} {delta_absolute:>8}"
|
39
39
|
line += " {left_percentage:>7} {right_percentage:>7} {delta_percentage:>7}"
|
40
40
|
|
@@ -43,7 +43,7 @@ class CompareSlicesReport(Report):
|
|
43
43
|
@property
|
44
44
|
def format_string(self) -> str:
|
45
45
|
"""Formatting string for each printed line."""
|
46
|
-
line = " {style}{subkey:<50}{endstyle}"
|
46
|
+
line = " {style}{marker} {subkey:<50}{endstyle}"
|
47
47
|
line += " {left_count:>8} {right_count:>8} {delta_absolute:>8}"
|
48
48
|
line += " {left_percentage:>7.2f} {right_percentage:>7.2f} {delta_percentage:>7.2f}"
|
49
49
|
|
@@ -28,7 +28,7 @@ class CorrelationChangeReport(Report):
|
|
28
28
|
@property
|
29
29
|
def header_string(self) -> str:
|
30
30
|
"""Formatting string for each printed line."""
|
31
|
-
line = " {style}{subkey:<50}{endstyle}"
|
31
|
+
line = " {style} {subkey:<50}{endstyle}"
|
32
32
|
line += " {timestamp:>10}"
|
33
33
|
line += " {left_correlation:>17}"
|
34
34
|
line += " {right_correlation:>17}"
|
@@ -39,7 +39,7 @@ class CorrelationChangeReport(Report):
|
|
39
39
|
@property
|
40
40
|
def format_string(self) -> str:
|
41
41
|
"""Formatting string for each printed line."""
|
42
|
-
line = " {style}{subkey:<50}{endstyle}"
|
42
|
+
line = " {style}{marker} {subkey:<50}{endstyle}"
|
43
43
|
line += " {timestamp:>10}"
|
44
44
|
line += " {left_correlation:>17.2f}"
|
45
45
|
line += " {right_correlation:>17.2f}"
|
@@ -22,7 +22,7 @@ class CorrelationReport(Report):
|
|
22
22
|
@property
|
23
23
|
def header_string(self) -> str:
|
24
24
|
"""Formatting string for each printed line."""
|
25
|
-
line = " {style}{subkey:<50}{endstyle}"
|
25
|
+
line = " {style} {subkey:<50}{endstyle}"
|
26
26
|
line += " {correlation:>11}"
|
27
27
|
|
28
28
|
return line
|
@@ -30,7 +30,7 @@ class CorrelationReport(Report):
|
|
30
30
|
@property
|
31
31
|
def format_string(self) -> str:
|
32
32
|
"""Formatting string for each printed line."""
|
33
|
-
line = " {style}{subkey:<50}{endstyle}"
|
33
|
+
line = " {style}{marker} {subkey:<50}{endstyle}"
|
34
34
|
line += " {correlation:>11.2f}"
|
35
35
|
|
36
36
|
return line
|
@@ -1,4 +1,4 @@
|
|
1
|
-
traffic_taffy/__init__.py,sha256=
|
1
|
+
traffic_taffy/__init__.py,sha256=uP67YUi8VVs_JVB_tdvT_PnmKv3-I2IqRNX1DcwDqGs,22
|
2
2
|
traffic_taffy/compare.py,sha256=g9rU6oa_2Wy0nUJ7K6TI8JTctyGCRvYEUakDBf7blOY,8644
|
3
3
|
traffic_taffy/comparison.py,sha256=KJxOp4UqhfRkF4LI1PMDRIefeyTm2w5sbdr7VUTS4KM,1451
|
4
4
|
traffic_taffy/config.py,sha256=DgTu2kA1Ec4Hbwl_44kTsdyJYvxAabgJk9a7aOH2XXU,4444
|
@@ -7,7 +7,6 @@ traffic_taffy/dissectmany.py,sha256=SWFXFyERNCi0j7hiMDEeJJdPYDpa0SOlSj1V8AqpXUA,
|
|
7
7
|
traffic_taffy/dissector.py,sha256=9QwGMGugHzVE8GWRpsfPXfSj02Sm2i_ZNU0Ah9AZ7BI,15654
|
8
8
|
traffic_taffy/graph.py,sha256=EfkxH5D9PNlDpvftkh9GyUusV05EV537QGB7JOMeW4w,4730
|
9
9
|
traffic_taffy/graphdata.py,sha256=r_QNXO3FzC7Vx4123SdCliAh7j2NCQ4Lb5uoOJnlt2M,3376
|
10
|
-
traffic_taffy/report.py,sha256=Yzb27hUWcWL-RxWpSQmRyM8NyWxQGT0l0jUCGHoYDSY,224
|
11
10
|
traffic_taffy/taffy_config.py,sha256=AmdQbWAhoiV7aTNSpV1exJfd5eA0a3sYTIjikHkMPwY,1124
|
12
11
|
traffic_taffy/algorithms/__init__.py,sha256=A7xI2ctotBT7WgG-6ItilXE_FIWF9QWc6UjdfGyThKw,737
|
13
12
|
traffic_taffy/algorithms/comparecorrelation.py,sha256=gakZJotZNOVj96y4_-vtt_ka8pZLBVERf44Yixtq_yE,5875
|
@@ -26,17 +25,16 @@ traffic_taffy/hooks/labels.py,sha256=5jHXq3-kxDQj9PRYgak-gDzE8dvSUiCEq9mBs9nE014
|
|
26
25
|
traffic_taffy/hooks/psl.py,sha256=A3maHS9FOholOEv1LuX0xSO3u34GyqeYl9_EtJG1pMY,2119
|
27
26
|
traffic_taffy/iana/tables.msgpak,sha256=d-R5Xw9yG9t4RqGJRrpE6cjH4YfaxQBwQiBhNjKZbwI,172825
|
28
27
|
traffic_taffy/output/__init__.py,sha256=qqlAUA99fxWlHEns-ji7A2RrcA8RA-AKXK7n2D737c8,3312
|
29
|
-
traffic_taffy/output/console.py,sha256=
|
28
|
+
traffic_taffy/output/console.py,sha256=x68iZYCq3jCn86AsnP339CnDJVLVojfmOOwSbJtaQjk,3195
|
30
29
|
traffic_taffy/output/fsdb.py,sha256=0z2zDydfnqOVM8Mj6pTJf4n4pGPupWykuYPgdgjJRN8,1859
|
31
30
|
traffic_taffy/output/memory.py,sha256=86tgJ-jMt3UVX31eP6U02YbbYRoqbYhhR4kXJQmYzO4,1870
|
32
31
|
traffic_taffy/reports/__init__.py,sha256=lMDS7q35aIdDrJ7G8ot4Q_6t9nYllr0C9510FL43rZY,113
|
33
|
-
traffic_taffy/reports/compareslicesreport.py,sha256=
|
34
|
-
traffic_taffy/reports/correlationchangereport.py,sha256=
|
35
|
-
traffic_taffy/reports/correlationreport.py,sha256=
|
32
|
+
traffic_taffy/reports/compareslicesreport.py,sha256=zLGlW158orhWuneav2_t2pJrEmIIskQEPsbIJMJesX8,2765
|
33
|
+
traffic_taffy/reports/correlationchangereport.py,sha256=GazkJe0dx7F0TiGl9G6_l3zHHkglYpA2PfpibvEdalE,1586
|
34
|
+
traffic_taffy/reports/correlationreport.py,sha256=QwwFzf1XKsPYQ-m5sHnLeCne0IMcHGamzsOEJBzL32c,1120
|
36
35
|
traffic_taffy/tests/test_compare_results.py,sha256=iLcS9wvEqxgKszIspLtD2Zw8Qk5JxOCurQwWYzhtOkM,2318
|
37
36
|
traffic_taffy/tests/test_config.py,sha256=UCqSJXVwpFFchcIbyFzLqjVF-wgEV755KlQ7thommro,4284
|
38
37
|
traffic_taffy/tests/test_dict_merge.py,sha256=t3rZSQQ0AlBxRKfLborx9SxYN53cCAQQzZ2w-__WT2Y,1429
|
39
|
-
traffic_taffy/tests/test_dpkt_engine.py,sha256=512Wfq7D1qVkfhGwf1u2QSgZooWqZQWV9L4OhpAr4AE,489
|
40
38
|
traffic_taffy/tests/test_global_config.py,sha256=kjr1wy1cXWagVLb0OnQYH0vz2htxLs944Xo42lNsir4,597
|
41
39
|
traffic_taffy/tests/test_hooks.py,sha256=amjEbtMwOZZCg_RCJ0wQR7aOqNfwz3IG3WY-9CwjSF4,1260
|
42
40
|
traffic_taffy/tests/test_normalize.py,sha256=sKHyiV8YXcKKcWqsbZP94nu_g5oEMJzzj6umeHxwa64,2638
|
@@ -52,8 +50,8 @@ traffic_taffy/tools/dissect.py,sha256=kGG0K2d9-OwrAhEU97id2m29PvhYaXZYIw1nLi1aVs
|
|
52
50
|
traffic_taffy/tools/explore.py,sha256=gUcOfAgangJJI1si1gLPUoWRUKmWUAXSP0oTD2JJygw,24149
|
53
51
|
traffic_taffy/tools/export.py,sha256=9zBBGhZK95b4ZiLJ8XK30GPsaBjgR84Sk1HoPIxRpTI,2844
|
54
52
|
traffic_taffy/tools/graph.py,sha256=KiKDY9R8JLT5-JouANoi_1WGcdFMhXsLnYlhPsFRWpM,2316
|
55
|
-
traffic_taffy-0.9.
|
56
|
-
traffic_taffy-0.9.
|
57
|
-
traffic_taffy-0.9.
|
58
|
-
traffic_taffy-0.9.
|
59
|
-
traffic_taffy-0.9.
|
53
|
+
traffic_taffy-0.9.8.dist-info/METADATA,sha256=AhnwUs9q5jfXHgQOWbF5wYFEkSX3al81a02UgMZLgak,2311
|
54
|
+
traffic_taffy-0.9.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
55
|
+
traffic_taffy-0.9.8.dist-info/entry_points.txt,sha256=F0lqjvw94nQ3hY4eerN7faT9aKhhGUHbqBhuEr9q1r8,361
|
56
|
+
traffic_taffy-0.9.8.dist-info/licenses/LICENSE.txt,sha256=eFp2vwcZFJW55SUQRoEfXio3K9XdwvsaI_WHntR7I2M,11338
|
57
|
+
traffic_taffy-0.9.8.dist-info/RECORD,,
|
traffic_taffy/report.py
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
from traffic_taffy.dissection import PCAPDissectorLevel
|
3
|
-
from traffic_taffy.dissector_engine.dpkt import DissectionEngineDpkt
|
4
|
-
|
5
|
-
def test_dpkt_engine():
|
6
|
-
test_pcap = "dns.pcap"
|
7
|
-
test_pcap = "port53-2023-30-31_20.pcap"
|
8
|
-
test_pcap = "airplane-wireless.pcap"
|
9
|
-
if not os.path.exists(test_pcap):
|
10
|
-
return
|
11
|
-
|
12
|
-
engine = DissectionEngineDpkt(test_pcap,
|
13
|
-
dissector_level = PCAPDissectorLevel.COMMON_LAYERS)
|
14
|
-
dissection = engine.load()
|
15
|
-
|
File without changes
|
File without changes
|
File without changes
|