-
Notifications
You must be signed in to change notification settings - Fork 260
Fix for passing target Domain without target DC or DC as FQDN instead of IP - also made -i accept comma separated list #180
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
Conversation
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.
Pull Request Overview
This PR enhances command-line argument handling for target domains and directory targets, adding support for comma-separated lists and domain name resolution to IP addresses.
- Added support for comma-separated list of directory targets in the
-iparameter - Implemented automatic DNS resolution for domain controllers when FQDN is provided instead of IP
- Enhanced domain controller selection logic to handle cases where only target domain is specified
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Snaffler/Config.cs | Added parsing logic for comma-separated directory targets and improved debug logging |
| SnaffCore/ActiveDirectory/Helpers.cs | Removed unused import statements |
| SnaffCore/ActiveDirectory/AdData.cs | Added DNS resolution functionality and improved domain controller selection logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| //Console.WriteLine(dirTargetArg.Value); | ||
| string pathTarget = dirTargetArg.Value; | ||
| if (dirTargetArg.Value.Length > 4) | ||
| Mq.Degub("Disabled finding shares."); |
Copilot
AI
Oct 7, 2025
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.
Corrected spelling of 'Degub' to 'Debug'.
| Mq.Degub("Target path is " + dirTargetArg.Value); | ||
| foreach (string pathTarget in parsedConfig.PathTargets) | ||
| { | ||
| Mq.Degub("Targeting path:" + pathTarget); |
Copilot
AI
Oct 7, 2025
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.
Corrected spelling of 'Degub' to 'Debug'.
| catch (Exception ex) | ||
| { | ||
| // Handle DNS resolution errors | ||
| Console.WriteLine($"Resolution failed for '{input}': {ex.Message}"); |
Copilot
AI
Oct 7, 2025
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.
Direct console output should be replaced with the logging framework (Mq) for consistency with the rest of the codebase.
| Console.WriteLine($"Resolution failed for '{input}': {ex.Message}"); | |
| AdDataInstance.Mq.Enqueue($"Resolution failed for '{input}': {ex.Message}"); |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fix for passing target Domain without target DC or DC as FQDN instead of IP - also made -i accept comma separated list