xbase-util 0.3.0__tar.gz → 0.3.2__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. {xbase_util-0.3.0 → xbase_util-0.3.2}/PKG-INFO +1 -1
  2. {xbase_util-0.3.0 → xbase_util-0.3.2}/setup.py +1 -1
  3. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/geo_util.py +3 -1
  4. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/xbase_util.py +6 -7
  5. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util.egg-info/PKG-INFO +1 -1
  6. {xbase_util-0.3.0 → xbase_util-0.3.2}/README.md +0 -0
  7. {xbase_util-0.3.0 → xbase_util-0.3.2}/setup.cfg +0 -0
  8. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/__init__.py +0 -0
  9. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/__init__.py +0 -0
  10. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/bean/ConfigBean.py +0 -0
  11. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/bean/CurrentConfigBean.py +0 -0
  12. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/bean/FlowBean.py +0 -0
  13. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/bean/TaskTemplateBean.py +0 -0
  14. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/bean/__init__.py +0 -0
  15. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/dao/ConfigDao.py +0 -0
  16. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/dao/CurrentConfigDao.py +0 -0
  17. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/dao/FlowDao.py +0 -0
  18. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/dao/TaskTemplateDao.py +0 -0
  19. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/dao/__init__.py +0 -0
  20. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/db/initsqlite3.py +0 -0
  21. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/es_db_util.py +0 -0
  22. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/esreq.py +0 -0
  23. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/handle_features_util.py +0 -0
  24. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/pcap_util.py +0 -0
  25. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util/xbase_constant.py +0 -0
  26. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util.egg-info/SOURCES.txt +0 -0
  27. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util.egg-info/dependency_links.txt +0 -0
  28. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util.egg-info/not-zip-safe +0 -0
  29. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util.egg-info/top_level.txt +0 -0
  30. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util_assets/GeoLite2-City.mmdb +0 -0
  31. {xbase_util-0.3.0 → xbase_util-0.3.2}/xbase_util_assets/arkimeparse.js +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xbase_util
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: 网络安全基础工具
5
5
  Home-page: https://gitee.com/jimonik/xbase_util.git
6
6
  Author: xyt
@@ -3,7 +3,7 @@ from distutils.core import setup
3
3
  from setuptools import find_packages
4
4
 
5
5
  setup(name="xbase_util",
6
- version="0.3.0",
6
+ version="0.3.2",
7
7
  description="网络安全基础工具",
8
8
  long_description="包含提取,预测,训练的基础工具",
9
9
  author="xyt",
@@ -35,7 +35,7 @@ class GeoUtil:
35
35
  if value == "" or value is None:
36
36
  return "IP_GEO_EMPTY"
37
37
  else:
38
- return value
38
+ return f"{value}"
39
39
 
40
40
  def get_geo_by_ip(self, geo_map):
41
41
  source_ip = geo_map["source.ip"]
@@ -63,6 +63,7 @@ class GeoUtil:
63
63
  geo_map['source.ip_Location_Latitude'] = "IP_GEO_EMPTY"
64
64
  geo_map["source.ip_Location_Longitude"] = "IP_GEO_EMPTY"
65
65
  else:
66
+ source_ip_name=f"{source_ip_name}"
66
67
  geo_map["source.ip_Country_IsoCode"] = source_ip_name
67
68
  geo_map['source.ip_Country_Name'] = source_ip_name
68
69
  geo_map["source.ip_Country_SpecificName"] = source_ip_name
@@ -96,6 +97,7 @@ class GeoUtil:
96
97
  geo_map['destination.ip_Location_Latitude'] = "IP_GEO_EMPTY"
97
98
  geo_map["destination.ip_Location_Longitude"] = "IP_GEO_EMPTY"
98
99
  else:
100
+ destination_ip_name=f"{destination_ip_name}"
99
101
  geo_map["destination.ip_Country_IsoCode"] = destination_ip_name
100
102
  geo_map['destination.ip_Country_Name'] = destination_ip_name
101
103
  geo_map["destination.ip_Country_SpecificName"] = destination_ip_name
@@ -225,22 +225,21 @@ def get_statistic_fields(packets):
225
225
  return field_map
226
226
 
227
227
 
228
- def get_dns_domain(packets):
229
- domain_name = ""
228
+ def get_dns_domains(packets):
229
+ domain_names = []
230
230
  for packet_item in packets:
231
231
  if DNS in packet_item:
232
232
  dns_layer = packet_item[DNS]
233
233
  if dns_layer.qd:
234
234
  try:
235
235
  domain_name = dns_layer.qd.qname.decode('utf-8')
236
- # print(f"dns域名:{domain_name}")
237
236
  except Exception:
238
237
  domain_name = str(dns_layer.qd.qname)
239
238
  print(f"dns域名编码失败的字符串:{domain_name}")
240
- break
241
- if domain_name.endswith("."):
242
- domain_name = domain_name[:-1]
243
- return domain_name
239
+ if domain_name.endswith("."):
240
+ domain_name = domain_name[:-1]
241
+ domain_names.append(domain_name)
242
+ return domain_names
244
243
 
245
244
 
246
245
  def extract_session_fields(origin_list, geoUtil):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xbase-util
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: 网络安全基础工具
5
5
  Home-page: https://gitee.com/jimonik/xbase_util.git
6
6
  Author: xyt
File without changes
File without changes