We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 36d6012 + 4c31c21 commit 8895737Copy full SHA for 8895737
1 file changed
misp_modules/modules/expansion/virustotal_public.py
@@ -1,5 +1,6 @@
1
import json
2
import logging
3
+import asyncio
4
from urllib.parse import urlparse
5
6
import vt
@@ -284,6 +285,11 @@ def parse_error(status_code: int) -> str:
284
285
def handler(q=False):
286
if q is False:
287
return False
288
+ try:
289
+ asyncio.get_running_loop()
290
+ except RuntimeError:
291
+ asyncio.set_event_loop(asyncio.new_event_loop())
292
+
293
request = json.loads(q)
294
if not request.get("config") or not request["config"].get("apikey"):
295
misperrors["error"] = "A VirusTotal api key is required for this module."
0 commit comments