defgetInstance():returnRegistryModule()classRegistryModule(Module):def__init__(self):self.name="edb"self.description="Extracts Windows EDB file"self.requiredVars=["winvol"]self.vars={}
path=tomb.getPath()+self.name+"/"if(notos.path.exists(path)):os.mkdir(path)logger.msgLog("Extracting Windows EDB from volumes: "+repr(self.vars['winvol'].value),"edb",logger.TYPE_INFO)forvolinself.vars['winvol'].value:mntpoint="/mnt/"try:mntid=mount("/dev/"+vol)except:raisemntpoint+=mntidfiles=[]ifwinver.getWindowsDirectory(mntpoint)==None:raiseException("No Windows installation present")version=winver.getWindowsVersion(mntpoint)ifversion<winver._WIN_XP:raiseException("No Windows Search EDB file in versions prior to Windows 2000")elifversion<winver._WIN_VISTA:files+=[mntpoint+"/Documents and Settings/All Users/Application Data/Microsoft/Search/Data/Applications/Windows/Windows.edb"]else:files+=[mntpoint+"/ProgramData/Microsoft/Search/Data/Applications/Windows/Windows.edb"]