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
This commit is contained in:
Alexandre Dulaunoy 2021-09-24 08:16:08 +02:00
parent d6fe136421
commit 7c174204f7
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -40,8 +40,11 @@ def wildcard_hashlookup(query):
return Response() return Response()
if not rdb.exists("h:{}".format(sha1.upper())): if not rdb.exists("h:{}".format(sha1.upper())):
return Response() return Response()
h = {}
h = rdb.hgetall("h:{}".format(sha1)) 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 "OpSystemCode" in h:
# if rdb.exists("h-OpSystemCode:{}".format(h['OpSystemCode'])): # if rdb.exists("h-OpSystemCode:{}".format(h['OpSystemCode'])):
# h['OpSystemCode'] = rdb.hgetall("h-OpSystemCode:{}".format(h['OpSystemCode'])) # h['OpSystemCode'] = rdb.hgetall("h-OpSystemCode:{}".format(h['OpSystemCode']))