mirror of https://github.com/CIRCL/lookyloo
fix: Catch exception for IPASN History.
parent
b490446436
commit
4d52b25d30
|
@ -740,14 +740,17 @@ class CapturesIndex(Mapping): # type: ignore[type-arg]
|
||||||
# and re-traverse the tree.
|
# and re-traverse the tree.
|
||||||
if self.ipasnhistory:
|
if self.ipasnhistory:
|
||||||
if query_ips := [{'ip': ip} for ip in _all_ips]:
|
if query_ips := [{'ip': ip} for ip in _all_ips]:
|
||||||
ipasn_responses = self.ipasnhistory.mass_query(query_ips)
|
try:
|
||||||
if 'responses' in ipasn_responses:
|
ipasn_responses = self.ipasnhistory.mass_query(query_ips)
|
||||||
for response in ipasn_responses['responses']:
|
if 'responses' in ipasn_responses:
|
||||||
ip = response['meta']['ip']
|
for response in ipasn_responses['responses']:
|
||||||
if responses := list(response['response'].values()):
|
ip = response['meta']['ip']
|
||||||
if ip not in ipasn and responses[0]:
|
if responses := list(response['response'].values()):
|
||||||
ipasn[ip] = responses[0]
|
if ip not in ipasn and responses[0]:
|
||||||
|
ipasn[ip] = responses[0]
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(f'Unable to query IPASNHistory: {e}')
|
||||||
if ipasn:
|
if ipasn:
|
||||||
# retraverse tree to populate it with the features
|
# retraverse tree to populate it with the features
|
||||||
for node in ct.root_hartree.hostname_tree.traverse():
|
for node in ct.root_hartree.hostname_tree.traverse():
|
||||||
|
|
|
@ -2790,13 +2790,13 @@ files = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "publicsuffixlist"
|
name = "publicsuffixlist"
|
||||||
version = "1.0.2.20241121"
|
version = "1.0.2.20241123"
|
||||||
description = "publicsuffixlist implement"
|
description = "publicsuffixlist implement"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.5"
|
python-versions = ">=3.5"
|
||||||
files = [
|
files = [
|
||||||
{file = "publicsuffixlist-1.0.2.20241121-py2.py3-none-any.whl", hash = "sha256:aa959594e48f580b34086b2f337979ae9b85b1b0ba41a4e2f191103d766a07d7"},
|
{file = "publicsuffixlist-1.0.2.20241123-py2.py3-none-any.whl", hash = "sha256:16b6a101c78908a3b44d82f3d23b40200e84c7ab92d533db2d60e636c705e5b8"},
|
||||||
{file = "publicsuffixlist-1.0.2.20241121.tar.gz", hash = "sha256:778dfb7a6e842810c62f626e7e9357d68fa43b76dab31e5eff16fb9b8776a9e7"},
|
{file = "publicsuffixlist-1.0.2.20241123.tar.gz", hash = "sha256:6feef67048dac5981559ba4bbf81196342accefe78e7f9e25e91af5a91091a01"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
|
@ -4501,4 +4501,4 @@ type = ["pytest-mypy"]
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = ">=3.9,<3.14"
|
python-versions = ">=3.9,<3.14"
|
||||||
content-hash = "237983ec94b660f485abae605153261de0e83357384bb5ff336a91e6dcfa4454"
|
content-hash = "40b668da5b396e3bd041db39e3ac00b78dac08e457b7b855bc1ee743358adb4a"
|
||||||
|
|
|
@ -71,7 +71,7 @@ pypandora = "^1.9.1"
|
||||||
lacuscore = "^1.12.5"
|
lacuscore = "^1.12.5"
|
||||||
pylacus = "^1.12.0"
|
pylacus = "^1.12.0"
|
||||||
pyipasnhistory = "^2.1.2"
|
pyipasnhistory = "^2.1.2"
|
||||||
publicsuffixlist = "^1.0.2.20241121"
|
publicsuffixlist = "^1.0.2.20241123"
|
||||||
pyfaup = "^1.2"
|
pyfaup = "^1.2"
|
||||||
chardet = "^5.2.0"
|
chardet = "^5.2.0"
|
||||||
pysecuritytxt = "^1.3.2"
|
pysecuritytxt = "^1.3.2"
|
||||||
|
|
Loading…
Reference in New Issue