lacuscore 1.17.1__py3-none-any.whl → 1.17.2__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 +11 -2
- {lacuscore-1.17.1.dist-info → lacuscore-1.17.2.dist-info}/METADATA +1 -1
- {lacuscore-1.17.1.dist-info → lacuscore-1.17.2.dist-info}/RECORD +5 -5
- {lacuscore-1.17.1.dist-info → lacuscore-1.17.2.dist-info}/LICENSE +0 -0
- {lacuscore-1.17.1.dist-info → lacuscore-1.17.2.dist-info}/WHEEL +0 -0
lacuscore/lacuscore.py
CHANGED
@@ -86,7 +86,8 @@ class LacusCore():
|
|
86
86
|
:param redis_connector: Pre-configured connector to a redis instance.
|
87
87
|
:param max_capture_time: If the capture takes more than that time, break (in seconds)
|
88
88
|
:param expire_results: The capture results are stored in redis. Expire them after they are done (in seconds).
|
89
|
-
:param tor_proxy: URL to a
|
89
|
+
:param tor_proxy: URL to a SOCKS5 tor proxy. If you have tor installed, this is the default: socks5://127.0.0.1:9050.
|
90
|
+
:param i2p_proxy: URL to a HTTP I2P proxy. If you have i2p installed, this is the default: http://127.0.0.1:4444.
|
90
91
|
:param only_global_lookups: Discard captures that point to non-public IPs.
|
91
92
|
:param max_retries: How many times should we re-try a capture if it failed.
|
92
93
|
"""
|
@@ -95,6 +96,7 @@ class LacusCore():
|
|
95
96
|
max_capture_time: int=3600,
|
96
97
|
expire_results: int=36000,
|
97
98
|
tor_proxy: str | None=None,
|
99
|
+
i2p_proxy: str | None=None,
|
98
100
|
only_global_lookups: bool=True,
|
99
101
|
max_retries: int=3,
|
100
102
|
headed_allowed: bool=False,
|
@@ -106,6 +108,7 @@ class LacusCore():
|
|
106
108
|
self.max_capture_time = max_capture_time
|
107
109
|
self.expire_results = expire_results
|
108
110
|
self.tor_proxy = tor_proxy
|
111
|
+
self.i2p_proxy = i2p_proxy
|
109
112
|
self.only_global_lookups = only_global_lookups
|
110
113
|
self.max_retries = max_retries
|
111
114
|
self.headed_allowed = headed_allowed
|
@@ -456,11 +459,17 @@ class LacusCore():
|
|
456
459
|
and splitted_url.hostname
|
457
460
|
and splitted_url.hostname.split('.')[-1] == 'onion')):
|
458
461
|
proxy = self.tor_proxy
|
462
|
+
elif self.i2p_proxy:
|
463
|
+
if (not proxy # if the TLD is "i2p", we use the pre-configured I2P proxy
|
464
|
+
and splitted_url.netloc
|
465
|
+
and splitted_url.hostname
|
466
|
+
and splitted_url.hostname.split('.')[-1] == 'i2p'):
|
467
|
+
proxy = self.i2p_proxy
|
459
468
|
|
460
469
|
if self.only_global_lookups and not proxy and splitted_url.scheme not in ['data', 'file']:
|
461
470
|
# not relevant if we also have a proxy, or the thing to capture is a data URI or a file on disk
|
462
471
|
if splitted_url.netloc:
|
463
|
-
if splitted_url.hostname and splitted_url.hostname.split('.')[-1]
|
472
|
+
if splitted_url.hostname and splitted_url.hostname.split('.')[-1] not in ['onion', 'i2p']:
|
464
473
|
ips_to_check = []
|
465
474
|
# check if the hostname is an IP
|
466
475
|
try:
|
@@ -1,10 +1,10 @@
|
|
1
1
|
lacuscore/__init__.py,sha256=aLBshQPT9IBDKn5qWrX9A_exqtLFPyLsQiPWdfpAFjA,537
|
2
2
|
lacuscore/helpers.py,sha256=dTt-FM7SnwEgIeGTCAvREwa1K224iNb16mmaCwcY_eg,14096
|
3
3
|
lacuscore/lacus_monitoring.py,sha256=r6IaYuh6sMq43eOWdZx0fU8p4PWVZlqSD6nr6yOaTUU,2713
|
4
|
-
lacuscore/lacuscore.py,sha256=
|
4
|
+
lacuscore/lacuscore.py,sha256=fU8rojUgdxHlLjMwqDcZetwMBPVEVAS341g4xcusK4g,45682
|
5
5
|
lacuscore/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
lacuscore/task_logger.py,sha256=2wDotU6r6vn-aKO8nZNdxSuisSj11LlcxuvW60qPL0Y,1909
|
7
|
-
lacuscore-1.17.
|
8
|
-
lacuscore-1.17.
|
9
|
-
lacuscore-1.17.
|
10
|
-
lacuscore-1.17.
|
7
|
+
lacuscore-1.17.2.dist-info/LICENSE,sha256=4C4hLYrIkUD96Ggk-y_Go1Qf7PBZrEm9PSeTGe2nd4s,1516
|
8
|
+
lacuscore-1.17.2.dist-info/METADATA,sha256=t83EragMDEZzYsfX53l1bGbiiItE8hUTVM6nm7ESc70,2654
|
9
|
+
lacuscore-1.17.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
10
|
+
lacuscore-1.17.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|