This commit is contained in:
Mariusz B. / mgeeky 2021-10-23 12:30:53 +02:00
parent dbe602a1ec
commit c61fab4dc1
1 changed files with 10 additions and 7 deletions

View File

@ -245,6 +245,7 @@ def processDir(args, regexes, path, results, uniqueSymbols, filesProcessed, symb
filePaths = []
for file in glob.glob(os.path.join(path, '**'), recursive=args.recurse):
try:
if os.path.isfile(file):
looks_like_pe = False
with open(file, 'rb') as f:
@ -253,6 +254,8 @@ def processDir(args, regexes, path, results, uniqueSymbols, filesProcessed, symb
looks_like_pe = (mz[0] == ord('M') and mz[1] == ord('Z')) or (mz[1] == ord('M') and mz[0] == ord('Z'))
if looks_like_pe: filePaths.append(file)
except:
continue
cpu_count = multiprocessing.cpu_count()