malfind and yarascan should not bt if the specified output directory doesn't exist or if its a file - spotted by attrc

This commit is contained in:
iMHLv2
2012-07-28 15:35:18 +00:00
parent f2bcc5ebe7
commit 2f7e6ed60d
+7
View File
@@ -453,6 +453,9 @@ class YaraScan(taskmods.DllList):
def render_text(self, outfd, data):
if self._config.DUMP_DIR and not os.path.isdir(self._config.DUMP_DIR):
debug.error(self._config.DUMP_DIR + " is not a directory")
for o, addr, hit, content in data:
outfd.write("Rule: {0}\n".format(hit.rule))
@@ -513,6 +516,10 @@ class Malfind(vadinfo.VADDump):
return True
def render_text(self, outfd, data):
if self._config.DUMP_DIR and not os.path.isdir(self._config.DUMP_DIR):
debug.error(self._config.DUMP_DIR + " is not a directory")
for task in data:
for vad, address_space in task.get_vads(vad_filter = task._injection_filter):