lacuscore 1.12.2__py3-none-any.whl → 1.12.4__py3-none-any.whl
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.
- lacuscore/lacuscore.py +4 -1
- {lacuscore-1.12.2.dist-info → lacuscore-1.12.4.dist-info}/METADATA +3 -3
- {lacuscore-1.12.2.dist-info → lacuscore-1.12.4.dist-info}/RECORD +5 -5
- {lacuscore-1.12.2.dist-info → lacuscore-1.12.4.dist-info}/LICENSE +0 -0
- {lacuscore-1.12.2.dist-info → lacuscore-1.12.4.dist-info}/WHEEL +0 -0
lacuscore/lacuscore.py
CHANGED
@@ -82,6 +82,7 @@ class LacusCore():
|
|
82
82
|
|
83
83
|
:param redis_connector: Pre-configured connector to a redis instance.
|
84
84
|
:param max_capture_time: If the capture takes more than that time, break (in seconds)
|
85
|
+
:param expire_results: The capture results are stored in redis. Expire them after they are done (in seconds).
|
85
86
|
:param tor_proxy: URL to a SOCKS 5 tor proxy. If you have tor installed, this is the default: socks5://127.0.0.1:9050.
|
86
87
|
:param only_global_lookups: Discard captures that point to non-public IPs.
|
87
88
|
:param max_retries: How many times should we re-try a capture if it failed.
|
@@ -89,6 +90,7 @@ class LacusCore():
|
|
89
90
|
|
90
91
|
def __init__(self, redis_connector: Redis[bytes], /, *,
|
91
92
|
max_capture_time: int=3600,
|
93
|
+
expire_results: int=36000,
|
92
94
|
tor_proxy: str | None=None,
|
93
95
|
only_global_lookups: bool=True,
|
94
96
|
max_retries: int=3,
|
@@ -97,6 +99,7 @@ class LacusCore():
|
|
97
99
|
self.master_logger.setLevel(loglevel)
|
98
100
|
self.redis = redis_connector
|
99
101
|
self.max_capture_time = max_capture_time
|
102
|
+
self.expire_results = expire_results
|
100
103
|
self.tor_proxy = tor_proxy
|
101
104
|
self.only_global_lookups = only_global_lookups
|
102
105
|
self.max_retries = max_retries
|
@@ -681,7 +684,7 @@ class LacusCore():
|
|
681
684
|
if hash_to_set:
|
682
685
|
pipeline.hset(root_key, mapping=hash_to_set) # type: ignore[arg-type]
|
683
686
|
# Make sure the key expires
|
684
|
-
pipeline.expire(root_key,
|
687
|
+
pipeline.expire(root_key, self.expire_results)
|
685
688
|
else:
|
686
689
|
logger.critical(f'Nothing to store (Hash: {hash_to_set}) for {root_key}')
|
687
690
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lacuscore
|
3
|
-
Version: 1.12.
|
3
|
+
Version: 1.12.4
|
4
4
|
Summary: Core of Lacus, usable as a module
|
5
5
|
Home-page: https://github.com/ail-project/LacusCore
|
6
6
|
License: BSD-3-Clause
|
@@ -29,8 +29,8 @@ Requires-Dist: async-timeout (>=4.0.3,<5.0.0) ; python_version < "3.11"
|
|
29
29
|
Requires-Dist: defang (>=0.5.3,<0.6.0)
|
30
30
|
Requires-Dist: dnspython (>=2.7.0,<3.0.0) ; python_version >= "3.9"
|
31
31
|
Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0) ; python_version < "3.10"
|
32
|
-
Requires-Dist: playwrightcapture[recaptcha] (>=1.27.
|
33
|
-
Requires-Dist: pydantic (>=2.
|
32
|
+
Requires-Dist: playwrightcapture[recaptcha] (>=1.27.2,<2.0.0)
|
33
|
+
Requires-Dist: pydantic (>=2.10.1,<3.0.0)
|
34
34
|
Requires-Dist: redis[hiredis] (>=5.2.0,<6.0.0)
|
35
35
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
36
36
|
Requires-Dist: ua-parser (>=0.18.0,<0.19.0)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
lacuscore/__init__.py,sha256=aLBshQPT9IBDKn5qWrX9A_exqtLFPyLsQiPWdfpAFjA,537
|
2
2
|
lacuscore/helpers.py,sha256=a7dwcNwwF04czQaGaVdcDrXbBJvAdGTJU7Gi4L_pNd4,10954
|
3
3
|
lacuscore/lacus_monitoring.py,sha256=r6IaYuh6sMq43eOWdZx0fU8p4PWVZlqSD6nr6yOaTUU,2713
|
4
|
-
lacuscore/lacuscore.py,sha256=
|
4
|
+
lacuscore/lacuscore.py,sha256=LhX-3B7I-yWs2BjXKjh_-4vGruapI2-4e9eg_BX8nJo,41690
|
5
5
|
lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
|
7
|
-
lacuscore-1.12.
|
8
|
-
lacuscore-1.12.
|
9
|
-
lacuscore-1.12.
|
10
|
-
lacuscore-1.12.
|
7
|
+
lacuscore-1.12.4.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
|
8
|
+
lacuscore-1.12.4.dist-info/METADATA,sha256=yNlOUYx945SiDo_xcLnTfIp_RyRjsBOm4N9vnlvjX7s,2807
|
9
|
+
lacuscore-1.12.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
10
|
+
lacuscore-1.12.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|