You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# print("Potentially found Microsoft ESEDB, treating as NTDS at offset {} within searched chunk {}. Writing to {}".format(temp_NTDS - 8, chunk_num, tmp_name))
# shoutout to @knavesec for this monstrosity, summing across a list of bools hurts me
187
-
if ((found[1] ==True) and (sum(found) >=2)):
182
+
if ((notno_auto_dump) and ((found[1] ==True) and (sum(found) >=2))):
188
183
autodump(found[0], found[1], found[2], found[3])
189
184
190
185
191
-
defmain(f, f_size):
186
+
defmain(f, f_size, clean, no_auto_dump):
192
187
# reading in chunks and scanning through the chunks, if we don't find anything, maybe our chunks were too small and the pattern was at the boundry of chunks so we need to seek by chunk / 2 and scan again
193
188
194
189
chunk_size=4*1024*1024# 4MiB
@@ -200,17 +195,17 @@ def main(f, f_size):
200
195
f.seek(start)
201
196
chunk=f.read(chunk_size)
202
197
chunk_num+=1
203
-
if (search_chunk(chunk, chunk_num, chunk_size, False) ==True):
198
+
if (search_chunk(chunk, chunk_num, chunk_size, haystack, f_size, False, clean) ==True):
parser.add_argument('--hacky-clean', type=str2bool, nargs='?', const=True, default=False, help="Clean dirty on disk registry keys in a very hacky way that somehow works (usually needed for vhd)")
239
-
parser.add_argument('--auto-dump', type=str2bool, nargs='?', const=True, default=True, help="Try to automatically use secretsdump if SAM and SYSTEM or SYSTEM and SECURITY are found")
233
+
parser.add_argument('--clean', action='store_true', default=False, help="Clean dirty on disk registry keys in a very hacky way that somehow works (usually needed for vhd)")
234
+
parser.add_argument('--no-auto-dump', action='store_true', default=False, help="Try to automatically use secretsdump if SAM and SYSTEM or SYSTEM and SECURITY are found")
240
235
parser.add_argument('haystack', metavar='haystack', type=str, nargs='*', help='Haystack to parse')
0 commit comments