Skip to content

Fix incorrect exception handling#1081

Open
serwiz wants to merge 1 commit intoPennyw0rth:mainfrom
serwiz:fix/add-computer-exception-catch
Open

Fix incorrect exception handling#1081
serwiz wants to merge 1 commit intoPennyw0rth:mainfrom
serwiz:fix/add-computer-exception-catch

Conversation

@serwiz
Copy link

@serwiz serwiz commented Jan 24, 2026

Description

This resolves an issue where exception catching could fail when a machine account creation attempt exceeds the domain’s Machine Account Quota, due to incorrect handling of the raised exception.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Deprecation of feature or functionality
  • This change requires a documentation update
  • This requires a third party update (such as Impacket, Dploot, lsassy, etc)

Setup guide for the review

OS: Linux (Debian-based)
Python version: Python 3.11
Target environment: Active Directory domain
Domain Controller: Windows Server 2022 (standard AD configuration)
Default domain settings, no custom GPOs required

Screenshots (if appropriate):

image

Checklist:

  • I have ran Ruff against my changes (via poetry: poetry run python -m ruff check . --preview, use --fix to automatically fix what it can)
  • I have added or updated the tests/e2e_commands.txt file if necessary (new modules or features are required to be added to the e2e tests)
  • New and existing e2e tests pass locally with my changes
  • If reliant on changes of third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (PR here: https://github.com/Pennyw0rth/NetExec-Wiki)

@NeffIsBack
Copy link
Member

Thanks for the bugfix PR! I'll take a look at it soon.

@NeffIsBack NeffIsBack added the bug-fix This Pull Request fixes a bug label Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix This Pull Request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants