har2tree 1.27.9__tar.gz → 1.27.11__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.
- {har2tree-1.27.9 → har2tree-1.27.11}/PKG-INFO +3 -3
- {har2tree-1.27.9 → har2tree-1.27.11}/har2tree/har2tree.py +6 -1
- {har2tree-1.27.9 → har2tree-1.27.11}/har2tree/helper.py +7 -1
- {har2tree-1.27.9 → har2tree-1.27.11}/pyproject.toml +6 -6
- {har2tree-1.27.9 → har2tree-1.27.11}/LICENSE +0 -0
- {har2tree-1.27.9 → har2tree-1.27.11}/README.md +0 -0
- {har2tree-1.27.9 → har2tree-1.27.11}/har2tree/__init__.py +0 -0
- {har2tree-1.27.9 → har2tree-1.27.11}/har2tree/nodes.py +0 -0
- {har2tree-1.27.9 → har2tree-1.27.11}/har2tree/parser.py +0 -0
- {har2tree-1.27.9 → har2tree-1.27.11}/har2tree/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: har2tree
|
|
3
|
-
Version: 1.27.
|
|
3
|
+
Version: 1.27.11
|
|
4
4
|
Summary: HTTP Archive (HAR) to ETE Toolkit generator
|
|
5
5
|
License: BSD-3-Clause
|
|
6
6
|
Author: Raphaël Vinot
|
|
@@ -21,13 +21,13 @@ Classifier: Topic :: Internet
|
|
|
21
21
|
Classifier: Topic :: Security
|
|
22
22
|
Provides-Extra: docs
|
|
23
23
|
Requires-Dist: Sphinx (>=8.1.3) ; (python_version >= "3.10") and (extra == "docs")
|
|
24
|
-
Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.13.
|
|
24
|
+
Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.13.3)
|
|
25
25
|
Requires-Dist: ete3 (>=3.1.3)
|
|
26
26
|
Requires-Dist: filetype (>=1.2.0)
|
|
27
27
|
Requires-Dist: legacy-cgi (>=2.6.2) ; python_version >= "3.13,<4.0"
|
|
28
28
|
Requires-Dist: numpy (<=2.1) ; python_version == "3.9"
|
|
29
29
|
Requires-Dist: numpy (>=2.2.2) ; python_version >= "3.10"
|
|
30
|
-
Requires-Dist: publicsuffixlist (>=1.0.2.
|
|
30
|
+
Requires-Dist: publicsuffixlist (>=1.0.2.20250212)
|
|
31
31
|
Requires-Dist: six (>=1.17.0) ; extra == "docs"
|
|
32
32
|
Requires-Dist: tinycss2 (>=1.4.0)
|
|
33
33
|
Requires-Dist: w3lib (>=2.3.1)
|
|
@@ -775,8 +775,13 @@ class Har2Tree:
|
|
|
775
775
|
else:
|
|
776
776
|
self.logger.warning(f'The URLNode has a redirect to something we already processed ({unode.redirect_url}), this should not happen.')
|
|
777
777
|
|
|
778
|
-
#
|
|
778
|
+
# 2025-02-06: If a node has no redirect **and** no content (empty response), we don't want to attach anything to it (it is a leaf)
|
|
779
|
+
# Example: A POST to self that triggers the **parent** to load an other URL. In this case,
|
|
780
|
+
# the proper attachment point is the parent, not this node, even if we have other nodes with this node URL as a referer.
|
|
781
|
+
if unode.empty_response:
|
|
782
|
+
continue
|
|
779
783
|
|
|
784
|
+
# The node can have a redirect, but also trigger ressources refering to themselves, we need to trigger this code on each node.
|
|
780
785
|
if self.all_initiator_url.get(unode.name):
|
|
781
786
|
# The URL (unode.name) is in the list of known urls initiating calls
|
|
782
787
|
for u in self.all_initiator_url[unode.name]:
|
|
@@ -333,8 +333,14 @@ def find_external_ressources_in_css(css: str) -> list[str]:
|
|
|
333
333
|
for r in __flatten_rules(rules):
|
|
334
334
|
# other entries may have urls, but they will always be in a url() function
|
|
335
335
|
if r.type == 'url':
|
|
336
|
-
|
|
336
|
+
try:
|
|
337
|
+
to_return.append(r.value)
|
|
338
|
+
except Exception as e:
|
|
339
|
+
logger.warning(f'Parsing error in tinycss2: {e} - {r}')
|
|
337
340
|
elif r.type == 'function' and r.lower_name == 'url':
|
|
341
|
+
if isinstance(r.arguments[0], tinycss2.ast.ParseError):
|
|
342
|
+
# CSS is broken, cannot parse it. Generally a missing closing quote.
|
|
343
|
+
continue
|
|
338
344
|
to_return.append(r.arguments[0].value)
|
|
339
345
|
return to_return
|
|
340
346
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "har2tree"
|
|
3
|
-
version = "1.27.
|
|
3
|
+
version = "1.27.11"
|
|
4
4
|
description = "HTTP Archive (HAR) to ETE Toolkit generator"
|
|
5
5
|
authors = [
|
|
6
6
|
{name="Raphaël Vinot", email="raphael.vinot@circl.lu"}
|
|
@@ -13,8 +13,8 @@ dynamic = [ "classifiers" ]
|
|
|
13
13
|
|
|
14
14
|
dependencies = [
|
|
15
15
|
"ete3 (>=3.1.3)",
|
|
16
|
-
"beautifulsoup4[charset-normalizer,lxml] (>=4.13.
|
|
17
|
-
"publicsuffixlist (>=1.0.2.
|
|
16
|
+
"beautifulsoup4[charset-normalizer,lxml] (>=4.13.3)",
|
|
17
|
+
"publicsuffixlist (>=1.0.2.20250212)",
|
|
18
18
|
"filetype (>=1.2.0)",
|
|
19
19
|
# poetry up fails with the version of numpy forced for python < 3.10.
|
|
20
20
|
# The work around is to comment it, run poetry up, uncomment it. and run poetry update.
|
|
@@ -44,10 +44,10 @@ classifiers = [
|
|
|
44
44
|
docs = ["Sphinx (>=8.1.3) ; python_version >= \"3.10\"", "six (>=1.17.0)"]
|
|
45
45
|
|
|
46
46
|
[tool.poetry.group.dev.dependencies]
|
|
47
|
-
mypy = "^1.
|
|
47
|
+
mypy = "^1.15.0"
|
|
48
48
|
pytest-cov = "^6.0.0"
|
|
49
|
-
coverage = "^7.6.
|
|
50
|
-
types-beautifulsoup4 = "^4.12.0.
|
|
49
|
+
coverage = "^7.6.12"
|
|
50
|
+
types-beautifulsoup4 = "^4.12.0.20250204"
|
|
51
51
|
|
|
52
52
|
[build-system]
|
|
53
53
|
requires = ["poetry-core>=2.0"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|