Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4f2981f

Browse files
committed
Minor fix
1 parent f4b8a3c commit 4f2981f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/techniques/error/use.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def _oneShotErrorUse(expression, field=None):
142142
retVal = output
143143
break
144144
except:
145-
hashDBWrite(expression, "%s%s" % (retVal, PARTIAL_VALUE_MARKER))
145+
if retVal is not None:
146+
hashDBWrite(expression, "%s%s" % (retVal, PARTIAL_VALUE_MARKER))
146147
raise
147148

148149
retVal = decodeHexValue(retVal) if conf.hexConvert else retVal
@@ -152,7 +153,8 @@ def _oneShotErrorUse(expression, field=None):
152153

153154
retVal = _errorReplaceChars(retVal)
154155

155-
hashDBWrite(expression, retVal)
156+
if retVal is not None:
157+
hashDBWrite(expression, retVal)
156158

157159
else:
158160
_ = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)

0 commit comments

Comments
 (0)