File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
volatility3/framework/plugins/windows Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change 22# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
33#
44
5+ import logging
6+
57from typing import Iterable , Generator , List , Tuple
68
79from volatility3 .framework import constants , interfaces , renderers
1719
1820from volatility3 .plugins .windows import modules
1921
22+ vollog = logging .getLogger (__name__ )
23+
2024
2125class Passphrase (interfaces .plugins .PluginInterface ):
2226 """TrueCrypt Cached Passphrase Finder"""
@@ -123,11 +127,18 @@ def _generator(self):
123127 mods : Iterable [ObjectInterface ] = modules .Modules .list_modules (
124128 self .context , self .config ["kernel" ]
125129 )
126- truecrypt_module_base = next (
127- mod .DllBase
128- for mod in mods
129- if mod .BaseDllName .get_string ().lower () == "truecrypt.sys"
130- )
130+ try :
131+ truecrypt_module_base = next (
132+ mod .DllBase
133+ for mod in mods
134+ if mod .BaseDllName .get_string ().lower () == "truecrypt.sys"
135+ )
136+ except StopIteration :
137+ vollog .warning (
138+ "Truecrypt module not found in the modules list. Unable to proceed."
139+ )
140+ return
141+
131142 for offset , password in self .scan_module (
132143 truecrypt_module_base , kernel .layer_name
133144 ):
You can’t perform that action at this time.
0 commit comments