Skip to content
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

[enhancement] - Find module - Adding directory exclusion logic with depth-based exclusion control #107

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

ghecko
Copy link
Contributor

@ghecko ghecko commented Oct 10, 2024

Summary

This pull request introduces the implementation of directory exclusion logic with depth-based control in the find method in SMBSession.py and the Find module.

Key Features:

  • Directory Exclusion by Name: You can now exclude directories by name using the --exclude-dir option. The exclusion comparison is case-sensitive.
  • Depth-Based Exclusion Control: The --exclude-dir-depth parameter allows you to specify at which depth directories should be excluded:
    • 0: Excludes directories at the initial level (default behavior).
    • Positive integers: Exclude directories at the corresponding depth level.
    • -1: Exclude directories at all levels, ensuring directories are skipped regardless of their depth in the hierarchy.

Use Case:

This feature allows users to fine-tune their searches by excluding specific directories at different levels of the directory structure. It is particularly useful when performing searches across deep directory hierarchies, giving users more control over which directories are included or excluded during the search.

@p0dalirius p0dalirius self-assigned this Oct 11, 2024
@p0dalirius p0dalirius added the enhancement New feature or request label Oct 11, 2024
@p0dalirius p0dalirius merged commit 5034419 into p0dalirius:main Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants