def processFile(self, file_fullpath, hostID, instanceID, rowsData):
rowNumber = 0
rowValid = True
file_object = loadFile(file_fullpath)
csvdata = file_object.read().splitlines()[1:]
file_object.close()
data = csv.reader(csvdata, dialect='IngestDialect1')
for row in data:
for field in row:
if b'\x00' in field:
settings.logger.warning("NULL byte found, ignoring bad shimcache parse: %s" % field)
rowValid = False
if rowValid:
path, filename = ntpath.split(row[2])
namedrow = settings.EntriesFields(HostID=hostID, EntryType=settings.__APPCOMPAT__, RowNumber=rowNumber,
LastModified=unicode(row[0]), LastUpdate=unicode(row[1]),
FilePath=unicode(path),
FileName=unicode(filename), Size=unicode(row[3]),
ExecFlag=str(row[4]), InstanceID=instanceID)
rowsData.append(namedrow)
rowNumber += 1
评论列表
文章目录