xbase-util 0.7.5__tar.gz → 0.7.7__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {xbase_util-0.7.5 → xbase_util-0.7.7}/PKG-INFO +1 -1
- {xbase_util-0.7.5 → xbase_util-0.7.7}/setup.py +1 -1
- {xbase_util-0.7.5 → xbase_util-0.7.7}/test/test.py +4 -2
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/pcap_util.py +5 -2
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util.egg-info/PKG-INFO +1 -1
- {xbase_util-0.7.5 → xbase_util-0.7.7}/README.md +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/setup.cfg +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/__init__.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/add_column_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/dangerous_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/__init__.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/bean/ConfigBean.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/bean/CurrentConfigBean.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/bean/FlowBean.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/bean/TaskTemplateBean.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/bean/__init__.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/dao/ConfigDao.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/dao/CurrentConfigDao.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/dao/FlowDao.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/dao/TaskTemplateDao.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/dao/__init__.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/db/initsqlite3.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/es_db_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/esreq.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/geo_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/handle_features_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/packet_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/xbase_constant.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util/xbase_util.py +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util.egg-info/SOURCES.txt +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util.egg-info/dependency_links.txt +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util.egg-info/not-zip-safe +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util.egg-info/top_level.txt +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util_assets/GeoLite2-City.mmdb +0 -0
- {xbase_util-0.7.5 → xbase_util-0.7.7}/xbase_util_assets/arkimeparse.js +0 -0
@@ -30,5 +30,7 @@ if __name__ == '__main__':
|
|
30
30
|
packet_objs = pickle.load(f)
|
31
31
|
skey = f"10.28.7.16:54398"
|
32
32
|
reassemble_tcp_res = reassemble_tcp(packet_objs, skey)
|
33
|
-
|
34
|
-
|
33
|
+
all_packets = reassemble_session(reassemble_tcp_res, skey)
|
34
|
+
time_period = [( abs(item['res_time']-item['req_time'])) for item in
|
35
|
+
all_packets if item['res_time'] != 0 and item['req_time'] != 0]
|
36
|
+
print(all_packets)
|
@@ -160,8 +160,8 @@ def reassemble_tcp(packets, skey, num_packets=1000):
|
|
160
160
|
else:
|
161
161
|
previous = item['tcp']['seq']
|
162
162
|
results[-1]['data'] = results[-1]['data'] + item['tcp']['data']
|
163
|
-
if skey != results[0]['key']:
|
164
|
-
|
163
|
+
# if skey != results[0]['key']:
|
164
|
+
# results.insert(0, {'data': b'', 'key': skey,'ts':0})
|
165
165
|
return results
|
166
166
|
|
167
167
|
|
@@ -231,16 +231,19 @@ def reassemble_session(reassemble_tcp_res, skey):
|
|
231
231
|
header, body = parse_req_or_res1(packet['data'])
|
232
232
|
if index == len(reassemble_tcp_res) - 1:
|
233
233
|
packet_list.append(copy.deepcopy(my_map))
|
234
|
+
my_map['key'] = packet['key']
|
234
235
|
if packet['key'] == skey:
|
235
236
|
if index != 0:
|
236
237
|
packet_list.append(copy.deepcopy(my_map))
|
237
238
|
my_map["req_header"] = header
|
238
239
|
my_map["req_body"] = body
|
239
240
|
my_map["req_time"] = packet['ts']
|
241
|
+
my_map["req_size"] = len(packet['data'])
|
240
242
|
else:
|
241
243
|
my_map["res_header"] = header
|
242
244
|
my_map["res_body"] = body
|
243
245
|
my_map["res_time"] = packet['ts']
|
246
|
+
my_map["res_size"] = len(packet['data'])
|
244
247
|
return packet_list
|
245
248
|
|
246
249
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|