FlowAnalyzer 0.2.8__tar.gz → 0.2.9__tar.gz
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.
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer/FlowAnalyzer.py +11 -4
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer.egg-info/PKG-INFO +3 -1
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/PKG-INFO +3 -1
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/README.md +2 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/setup.py +1 -1
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer/__init__.py +0 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer/logging_config.py +0 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer.egg-info/SOURCES.txt +0 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer.egg-info/dependency_links.txt +0 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/FlowAnalyzer.egg-info/top_level.txt +0 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/LICENSE +0 -0
- {FlowAnalyzer-0.2.8 → FlowAnalyzer-0.2.9}/setup.cfg +0 -0
|
@@ -81,9 +81,15 @@ class FlowAnalyzer:
|
|
|
81
81
|
for packet in data:
|
|
82
82
|
packet = packet["_source"]["layers"]
|
|
83
83
|
time_epoch = float(packet["frame.time_epoch"][0]) if packet.get("frame.time_epoch") else None
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
|
|
85
|
+
if packet.get("tcp.reassembled.data"):
|
|
86
|
+
full_request = packet["tcp.reassembled.data"][0]
|
|
87
|
+
elif packet.get("tcp.payload"):
|
|
88
|
+
full_request = packet["tcp.payload"][0]
|
|
89
|
+
else:
|
|
90
|
+
# exported_pdu.exported_pdu
|
|
91
|
+
full_request = packet["exported_pdu.exported_pdu"][0]
|
|
92
|
+
|
|
87
93
|
frame_num = int(packet["frame.number"][0]) if packet.get("frame.number") else None
|
|
88
94
|
request_in = int(packet["http.request_in"][0]) if packet.get("http.request_in") else frame_num
|
|
89
95
|
full_uri = (
|
|
@@ -140,7 +146,7 @@ class FlowAnalyzer:
|
|
|
140
146
|
# sourcery skip: replace-interpolation-with-fstring, use-fstring-for-formatting
|
|
141
147
|
# tshark -r {} -Y "{}" -T json -e http.request_number -e http.response_number -e http.request_in -e tcp.reassembled.data -e frame.number -e tcp.payload -e frame.time_epoch -e http.request.full_uri > output.json
|
|
142
148
|
command = (
|
|
143
|
-
'tshark -r {} -Y "{}" -T json '
|
|
149
|
+
'tshark -r {} -Y "(tcp.reassembled_in) or ({})" -T json '
|
|
144
150
|
'-e http.request_number '
|
|
145
151
|
'-e http.response_number '
|
|
146
152
|
'-e http.request_in '
|
|
@@ -148,6 +154,7 @@ class FlowAnalyzer:
|
|
|
148
154
|
'-e frame.number '
|
|
149
155
|
'-e tcp.payload '
|
|
150
156
|
'-e frame.time_epoch '
|
|
157
|
+
'-e exported_pdu.exported_pdu '
|
|
151
158
|
'-e http.request.full_uri '
|
|
152
159
|
'> output.json'.format(
|
|
153
160
|
fileName, display_filter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: FlowAnalyzer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: FlowAnalyzer是一个流量分析器,用于解析和处理tshark导出的JSON数据文件
|
|
5
5
|
Home-page: https://github.com/Byxs20/FlowAnalyzer
|
|
6
6
|
Author: Byxs20
|
|
@@ -22,6 +22,8 @@ Description: # FlowAnalyzer
|
|
|
22
22
|
|
|
23
23
|
# Usage
|
|
24
24
|
|
|
25
|
+
请务必添加 `tshark.exe` 到环境变量,否则找不到会出错!
|
|
26
|
+
|
|
25
27
|
```
|
|
26
28
|
$ git clone https://github.com/Byxs20/FlowAnalyzer.git
|
|
27
29
|
$ cd ./FlowAnalyzer/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: FlowAnalyzer
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: FlowAnalyzer是一个流量分析器,用于解析和处理tshark导出的JSON数据文件
|
|
5
5
|
Home-page: https://github.com/Byxs20/FlowAnalyzer
|
|
6
6
|
Author: Byxs20
|
|
@@ -22,6 +22,8 @@ Description: # FlowAnalyzer
|
|
|
22
22
|
|
|
23
23
|
# Usage
|
|
24
24
|
|
|
25
|
+
请务必添加 `tshark.exe` 到环境变量,否则找不到会出错!
|
|
26
|
+
|
|
25
27
|
```
|
|
26
28
|
$ git clone https://github.com/Byxs20/FlowAnalyzer.git
|
|
27
29
|
$ cd ./FlowAnalyzer/
|
|
@@ -7,7 +7,7 @@ with open(os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name="FlowAnalyzer",
|
|
10
|
-
version="0.2.
|
|
10
|
+
version="0.2.9",
|
|
11
11
|
description="FlowAnalyzer是一个流量分析器,用于解析和处理tshark导出的JSON数据文件",
|
|
12
12
|
author="Byxs20",
|
|
13
13
|
author_email="97766819@qq.com",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|