har2tree 1.32.1__tar.gz → 1.34.0__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.32.1 → har2tree-1.34.0}/PKG-INFO +11 -12
- {har2tree-1.32.1 → har2tree-1.34.0}/har2tree/har2tree.py +5 -1
- {har2tree-1.32.1 → har2tree-1.34.0}/har2tree/nodes.py +1 -0
- {har2tree-1.32.1 → har2tree-1.34.0}/pyproject.toml +12 -13
- {har2tree-1.32.1 → har2tree-1.34.0}/LICENSE +0 -0
- {har2tree-1.32.1 → har2tree-1.34.0}/README.md +0 -0
- {har2tree-1.32.1 → har2tree-1.34.0}/har2tree/__init__.py +0 -0
- {har2tree-1.32.1 → har2tree-1.34.0}/har2tree/helper.py +0 -0
- {har2tree-1.32.1 → har2tree-1.34.0}/har2tree/parser.py +0 -0
- {har2tree-1.32.1 → har2tree-1.34.0}/har2tree/py.typed +0 -0
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: har2tree
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.34.0
|
|
4
4
|
Summary: HTTP Archive (HAR) to ETE Toolkit generator
|
|
5
|
-
License: BSD-3-Clause
|
|
5
|
+
License-Expression: BSD-3-Clause
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Raphaël Vinot
|
|
7
8
|
Author-email: raphael.vinot@circl.lu
|
|
8
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.10,<4.0
|
|
9
10
|
Classifier: Intended Audience :: Information Technology
|
|
10
11
|
Classifier: Intended Audience :: Science/Research
|
|
11
12
|
Classifier: Intended Audience :: Telecommunications Industry
|
|
12
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
13
13
|
Classifier: Operating System :: POSIX :: Linux
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
20
|
Classifier: Topic :: Internet
|
|
21
21
|
Classifier: Topic :: Security
|
|
22
22
|
Provides-Extra: docs
|
|
23
23
|
Requires-Dist: Sphinx (>=8.2.3) ; (python_version >= "3.11") and (extra == "docs")
|
|
24
|
-
Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.
|
|
24
|
+
Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.14.2)
|
|
25
25
|
Requires-Dist: ete3 (>=3.1.3)
|
|
26
26
|
Requires-Dist: filetype (>=1.2.0)
|
|
27
27
|
Requires-Dist: json-stream (>=2.3.3,<3.0.0)
|
|
28
|
-
Requires-Dist: legacy-cgi (>=2.6.3) ; python_version >= "3.13
|
|
28
|
+
Requires-Dist: legacy-cgi (>=2.6.3) ; python_version >= "3.13" and python_version < "4.0"
|
|
29
29
|
Requires-Dist: multipart (>=1.3.0,<2.0.0)
|
|
30
|
-
Requires-Dist: numpy (
|
|
31
|
-
Requires-Dist: numpy (
|
|
32
|
-
Requires-Dist:
|
|
33
|
-
Requires-Dist: publicsuffixlist (>=1.0.2.20250824)
|
|
30
|
+
Requires-Dist: numpy (>=2.2,<2.3) ; python_version < "3.11"
|
|
31
|
+
Requires-Dist: numpy (>=2.3.4) ; python_version >= "3.11" and python_version < "4.0"
|
|
32
|
+
Requires-Dist: publicsuffixlist (>=1.0.2.20251015)
|
|
34
33
|
Requires-Dist: requests-toolbelt (>=1.0.0,<2.0.0)
|
|
35
34
|
Requires-Dist: six (>=1.17.0) ; extra == "docs"
|
|
36
35
|
Requires-Dist: tinycss2 (>=1.4.0)
|
|
@@ -118,7 +118,11 @@ class HarFile():
|
|
|
118
118
|
last_redirect = unquote_plus(_lr.read())
|
|
119
119
|
self.final_redirect: str = last_redirect
|
|
120
120
|
if not self._search_final_redirect():
|
|
121
|
-
|
|
121
|
+
if last_redirect.startswith('chrome') or last_redirect.startswith('about'):
|
|
122
|
+
# the capture failed.
|
|
123
|
+
pass
|
|
124
|
+
else:
|
|
125
|
+
self.logger.info(f'Final redirect URL from address bar not in tree: {last_redirect}')
|
|
122
126
|
else:
|
|
123
127
|
self.logger.debug('No last_redirect file available.')
|
|
124
128
|
self.final_redirect = ''
|
|
@@ -485,6 +485,7 @@ class URLNode(HarTreeNode):
|
|
|
485
485
|
|
|
486
486
|
# Common JS redirect we can catch easily
|
|
487
487
|
# NOTE: it is extremely fragile and doesn't work very often but is kinda better than nothing.
|
|
488
|
+
# NOTE 2025-08-30: Also, finding that doesn't mean it is in a part of the code that is executed without user interaction. It can be triggered after a user fills a form for example.
|
|
488
489
|
# Source: https://stackoverflow.com/questions/13363174/regular-expression-to-catch-as-many-javascript-redirections-as-possible
|
|
489
490
|
regex = re.compile(br"""((location.href)|(window.location)|(location.replace)|(location.assign))(( ?= ?)|( ?\( ?))("|')([^'"]*)("|')( ?\) ?)?;""", re.I)
|
|
490
491
|
matches = re.findall(regex, self.body.getvalue())
|
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "har2tree"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.34.0"
|
|
4
4
|
description = "HTTP Archive (HAR) to ETE Toolkit generator"
|
|
5
5
|
authors = [
|
|
6
6
|
{name="Raphaël Vinot", email="raphael.vinot@circl.lu"}
|
|
7
7
|
]
|
|
8
8
|
license = "BSD-3-Clause"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.10,<4.0"
|
|
11
11
|
|
|
12
12
|
dynamic = [ "classifiers" ]
|
|
13
13
|
|
|
14
14
|
dependencies = [
|
|
15
15
|
"ete3 (>=3.1.3)",
|
|
16
|
-
"beautifulsoup4[charset-normalizer,lxml] (>=4.
|
|
17
|
-
"publicsuffixlist (>=1.0.2.
|
|
16
|
+
"beautifulsoup4[charset-normalizer,lxml] (>=4.14.2)",
|
|
17
|
+
"publicsuffixlist (>=1.0.2.20251015)",
|
|
18
18
|
"filetype (>=1.2.0)",
|
|
19
|
-
# poetry up fails with the version of numpy forced for python < 3.
|
|
19
|
+
# poetry up fails with the version of numpy forced for python < 3.11.
|
|
20
20
|
# The work around is to comment it, run poetry up, uncomment it. and run poetry update.
|
|
21
|
-
"numpy (
|
|
22
|
-
"numpy (
|
|
23
|
-
"numpy (>=2.3.2) ; python_version >= \"3.11\"",
|
|
21
|
+
"numpy (>=2.2,<2.3) ; python_version < '3.11'",
|
|
22
|
+
"numpy (>=2.3.4) ; python_version >= \"3.11\" and python_version < \"4.0\"",
|
|
24
23
|
"w3lib (>=2.3.1)",
|
|
25
24
|
"tinycss2 (>=1.4.0)",
|
|
26
|
-
"legacy-cgi (>=2.6.3) ; python_version >=
|
|
25
|
+
"legacy-cgi (>=2.6.3) ; python_version >= '3.13' and python_version < '4.0'",
|
|
27
26
|
"multipart (>=1.3.0,<2.0.0)",
|
|
28
27
|
"json-stream (>=2.3.3,<3.0.0)",
|
|
29
|
-
"requests-toolbelt (>=1.0.0,<2.0.0)"
|
|
28
|
+
"requests-toolbelt (>=1.0.0,<2.0.0)"
|
|
30
29
|
]
|
|
31
30
|
|
|
32
31
|
[project.urls]
|
|
@@ -48,9 +47,9 @@ classifiers = [
|
|
|
48
47
|
docs = ["Sphinx (>=8.2.3) ; python_version >= \"3.11\"", "six (>=1.17.0)"]
|
|
49
48
|
|
|
50
49
|
[tool.poetry.group.dev.dependencies]
|
|
51
|
-
mypy = "^1.
|
|
52
|
-
pytest-cov = "^
|
|
53
|
-
coverage = "^7.
|
|
50
|
+
mypy = "^1.18.2"
|
|
51
|
+
pytest-cov = "^7.0.0"
|
|
52
|
+
coverage = "^7.11.0"
|
|
54
53
|
types-beautifulsoup4 = "^4.12.0.20250516"
|
|
55
54
|
|
|
56
55
|
[build-system]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|