defgetInstance():returnRegistryModule()classRegistryModule(Module):def__init__(self):self.name="evt"self.description="Extracts Windows Event Viewer files"self.requiredVars=["winvol"]self.vars={}
forvolinself.vars['winvol'].value:mntpoint="/mnt/"try:mntid=mount("/dev/"+vol)except:raisemntpoint+=mntidfiles=[]windir=winver.getWindowsDirectory(mntpoint)ifwindir==None:raiseException("No Windows installation present")version=winver.getWindowsVersion(mntpoint)ifversion<winver._WIN_2k:raiseException("No EVT files in Windows versions prior to Windows 2000")elifversion<winver._WIN_VISTA:files+=[windir+"/System32/config/*.evt"]files+=[windir+"/System32/config/*.Evt"]files+=[windir+"/System32/config/*.EVT"]else:files+=[windir+"/System32/winevt/Logs"]