forked from p15670423/monkey
agent: ransomware: Return list instead of filter object when getting files in directory
This commit is contained in:
parent
5b64ea5151
commit
3192355f5a
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from typing import Iterator, List
|
||||
from typing import List
|
||||
|
||||
VALID_FILE_EXTENSIONS_FOR_ENCRYPTION = {
|
||||
".3ds",
|
||||
|
@ -90,5 +90,7 @@ def get_files_to_encrypt(dir_path: str) -> List[str]:
|
|||
return files_to_encrypt
|
||||
|
||||
|
||||
def get_all_files_in_directory(dir_path: str) -> Iterator:
|
||||
return filter(os.path.isfile, [os.path.join(dir_path, item) for item in os.listdir(dir_path)])
|
||||
def get_all_files_in_directory(dir_path: str) -> List:
|
||||
return list(
|
||||
filter(os.path.isfile, [os.path.join(dir_path, item) for item in os.listdir(dir_path)])
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue