From 8a9d09f79b2bd95a0416a326840cc91080d2cac6 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 2 Apr 2012 14:11:23 +0000 Subject: [PATCH] minor fixes --- lib/techniques/dns/use.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/techniques/dns/use.py b/lib/techniques/dns/use.py index 2759d9df1..15f7956bc 100644 --- a/lib/techniques/dns/use.py +++ b/lib/techniques/dns/use.py @@ -48,7 +48,7 @@ def dnsUse(payload, expression): if conf.dnsDomain and Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE): output = hashDBRetrieve(expression, checkConf=True) - if PARTIAL_VALUE_MARKER in output: + if output and PARTIAL_VALUE_MARKER in output: output = None if output is None: @@ -86,7 +86,8 @@ def dnsUse(payload, expression): if output is not None: retVal = output dataToStdout("[%s] [INFO] %s: %s\r\n" % (time.strftime("%X"), "retrieved" if count > 0 else "resumed", safecharencode(output))) - hashDBWrite(expression, output) + if count > 0: + hashDBWrite(expression, output) if not kb.bruteMode: debugMsg = "performed %d queries in %d seconds" % (count, calculateDeltaSeconds(start))