visidata: add IOC types with cached, throttled lookups
Centralize provider caching and rate-limit handling, then add Domain/URL/Hash IOC types and safer VT/IPInfo key resolution so lookups stay reliable on free-tier APIs.
This commit is contained in:
@@ -10,10 +10,19 @@ their commands/types are registered on startup.
|
||||
for _mod in (
|
||||
"hidecol",
|
||||
"iptype",
|
||||
"ioc",
|
||||
):
|
||||
try:
|
||||
__import__(f"{__name__}.{_mod}")
|
||||
except Exception:
|
||||
# VisiData will show exceptions in its error sheet if needed; don't hard-fail here.
|
||||
pass
|
||||
except ModuleNotFoundError:
|
||||
# Optional/missing plugin file.
|
||||
continue
|
||||
except Exception as e:
|
||||
# Don't silently swallow unexpected import errors; surface them.
|
||||
try:
|
||||
from visidata import vd
|
||||
|
||||
vd.warning(f"plugin import failed: plugins.{_mod}")
|
||||
vd.exceptionCaught(e)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user