From 7c174204f7d1f60ebc76711e94fe67f4cf44ea1f Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Fri, 24 Sep 2021 08:16:08 +0200 Subject: [PATCH] fix: [dns] records are now too large for single hashlookup record reduce to some fields and the HTTP interface the fall-back to get more info --- dns/server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dns/server.py b/dns/server.py index 1174241..be4fae8 100644 --- a/dns/server.py +++ b/dns/server.py @@ -40,8 +40,11 @@ def wildcard_hashlookup(query): return Response() if not rdb.exists("h:{}".format(sha1.upper())): return Response() - - h = rdb.hgetall("h:{}".format(sha1)) + h = {} + h['SHA-1'] = rdb.hget("h:{}".format(sha1), 'SHA-1') + h['MD5'] = rdb.hget("h:{}".format(sha1), 'MD5') + h['FileName'] = rdb.hget("h:{}".format(sha1), 'FileName') + print(h) #if "OpSystemCode" in h: # if rdb.exists("h-OpSystemCode:{}".format(h['OpSystemCode'])): # h['OpSystemCode'] = rdb.hgetall("h-OpSystemCode:{}".format(h['OpSystemCode']))