network-core 0.2.1__tar.gz → 0.2.2__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.
Files changed (29) hide show
  1. {network_core-0.2.1 → network_core-0.2.2}/PKG-INFO +1 -1
  2. {network_core-0.2.1 → network_core-0.2.2}/network_core/http/httpExtract/helpers.py +7 -6
  3. {network_core-0.2.1 → network_core-0.2.2}/network_core.egg-info/PKG-INFO +1 -1
  4. {network_core-0.2.1 → network_core-0.2.2}/pyproject.toml +1 -1
  5. {network_core-0.2.1 → network_core-0.2.2}/network_core/__init__.py +0 -0
  6. {network_core-0.2.1 → network_core-0.2.2}/network_core/conn.py +0 -0
  7. {network_core-0.2.1 → network_core-0.2.2}/network_core/connOps.py +0 -0
  8. {network_core-0.2.1 → network_core-0.2.2}/network_core/dataModels.py +0 -0
  9. {network_core-0.2.1 → network_core-0.2.2}/network_core/http/__init__.py +0 -0
  10. {network_core-0.2.1 → network_core-0.2.2}/network_core/http/httpExtract/__init__.py +0 -0
  11. {network_core-0.2.1 → network_core-0.2.2}/network_core/http/httpExtract/parser.py +0 -0
  12. {network_core-0.2.1 → network_core-0.2.2}/network_core/http/httpExtract/pdh.py +0 -0
  13. {network_core-0.2.1 → network_core-0.2.2}/network_core/http/httpIO.py +0 -0
  14. {network_core-0.2.1 → network_core-0.2.2}/network_core/sni/__init__.py +0 -0
  15. {network_core-0.2.1 → network_core-0.2.2}/network_core/sni/clientHello.py +0 -0
  16. {network_core-0.2.1 → network_core-0.2.2}/network_core/sni/constants.py +0 -0
  17. {network_core-0.2.1 → network_core-0.2.2}/network_core/sni/crypto.py +0 -0
  18. {network_core-0.2.1 → network_core-0.2.2}/network_core/sni/helpers.py +0 -0
  19. {network_core-0.2.1 → network_core-0.2.2}/network_core/sni/parsers.py +0 -0
  20. {network_core-0.2.1 → network_core-0.2.2}/network_core/utils/__init__.py +0 -0
  21. {network_core-0.2.1 → network_core-0.2.2}/network_core/utils/csvIO.py +0 -0
  22. {network_core-0.2.1 → network_core-0.2.2}/network_core/utils/dt.py +0 -0
  23. {network_core-0.2.1 → network_core-0.2.2}/network_core/utils/jsonIO.py +0 -0
  24. {network_core-0.2.1 → network_core-0.2.2}/network_core/utils/pcapIO.py +0 -0
  25. {network_core-0.2.1 → network_core-0.2.2}/network_core.egg-info/SOURCES.txt +0 -0
  26. {network_core-0.2.1 → network_core-0.2.2}/network_core.egg-info/dependency_links.txt +0 -0
  27. {network_core-0.2.1 → network_core-0.2.2}/network_core.egg-info/requires.txt +0 -0
  28. {network_core-0.2.1 → network_core-0.2.2}/network_core.egg-info/top_level.txt +0 -0
  29. {network_core-0.2.1 → network_core-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: network_core
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Core networking utilities and data models
5
5
  Author: Your Name
6
6
  Requires-Python: >=3.9
@@ -102,15 +102,11 @@ def parse_hex(raw_bytes: bytes, encoding: str, content_type: str) -> dict | str:
102
102
  try:
103
103
  # message is a dict, typedef is the guessed structure
104
104
  message, typedef = blackboxprotobuf.decode_message(decompressed)
105
- return {
106
- "type": "protobuf_decoded",
107
- "data": message,
108
- "structure": typedef,
109
- }
105
+ return str(message) # Convert to string for JSON serialization
110
106
  except Exception as pb_e:
111
107
  print(f"Protobuf decoding failed: {pb_e}")
112
108
 
113
- return text_output
109
+ return str(text_output)
114
110
  except:
115
111
  return base64.b64encode(decompressed).decode("ascii") # JSON-safe string
116
112
 
@@ -125,6 +121,9 @@ def parse_http_unit_data(http_unit: HttpUnit):
125
121
  http_unit.response_data = parse_hex(
126
122
  raw_bytes=raw_bytes, encoding=encoding, content_type=content_type
127
123
  )
124
+ else:
125
+ print("Response data is not a string, skipping parsing.")
126
+
128
127
  except:
129
128
  pass
130
129
 
@@ -138,5 +137,7 @@ def parse_http_unit_data(http_unit: HttpUnit):
138
137
  http_unit.request_data = parse_hex( # type: ignore
139
138
  raw_bytes=raw_bytes, encoding=encoding, content_type=content_type
140
139
  )
140
+ else:
141
+ print("Request data is not a string, skipping parsing.")
141
142
  except:
142
143
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: network_core
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Core networking utilities and data models
5
5
  Author: Your Name
6
6
  Requires-Python: >=3.9
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "network_core"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "Core networking utilities and data models"
5
5
  authors = [{ name = "Your Name" }]
6
6
  readme = "README.md"
File without changes