-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added alternate data streams finder #4
base: main
Are you sure you want to change the base?
Conversation
mabott
commented
Sep 16, 2022
feel free to reject this if you prefer a different branch, I just realized I sent it to main from my fork |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR @mabott ! This looks great; I just have a few cleanup/refactoring comments. Going straight into the main branch from your fork totally works.
# print(_args) | ||
|
||
@staticmethod | ||
def get_named_streams(file_obj: FileInfo, work_obj: Worker) -> Optional[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you want -> Sequence[Tuple[str, str]]
here?
|
||
@staticmethod | ||
def work_start(_work_obj: Worker) -> None: | ||
FILE_NAME = ADSFinder.get_logfile_name(_work_obj.start_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: FILE_NAME
should be lower case since it's not a global variable
res = self.get_named_streams(file_obj, work_obj) | ||
if res: | ||
for r in res: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could collapse this to
for stream in self.get_named_streams(file_obj, work_obj):
...
since iterating an empty list will be a no-op
def every_batch( # pylint: disable=no-self-use | ||
self, file_list: Sequence[FileInfo], work_obj: Worker | ||
) -> None: | ||
action_count = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acount_count
isn't getting incremented anywhere; this and line 48 could be removed