Skip to content

Add exclude options based on @bdrogja's work #732#1204

Open
Dfte wants to merge 2 commits intoPennyw0rth:mainfrom
Dfte:add_exclude_options
Open

Add exclude options based on @bdrogja's work #732#1204
Dfte wants to merge 2 commits intoPennyw0rth:mainfrom
Dfte:add_exclude_options

Conversation

@Dfte
Copy link
Copy Markdown
Contributor

@Dfte Dfte commented Apr 15, 2026

Description

Opening this PR to continue @bdrogja work from #732.

This PR adds two new config options allowing to exclude some IP's from NetExec and excluding local IP's as well:

image

The exclude_hosts option is an array that can take multiple type of values:

  • An IP
  • a range 192.168.X.X - 192.168.X.Y
  • A CIDR 192.168.56.0/24
  • A file path containing all of the above

For example:

exclude_hosts = [192.168.56.60", "/opt/tools/ad/NetExec/test"]

As @bdrogja mentions, this PR also closes #674.

I don't know if the test.py part is relevant anymore tho.

Type of change

Insert an "x" inside the brackets for relevant items (do not delete options)

  • 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)
  • This PR was created with the assistance of AI (list what type of assistance, tool(s)/model(s) in the description)

Checklist :

Insert an "x" inside the brackets for completed and relevant items (do not delete options)

  • I have ran Ruff against my changes (poetry: poetry run ruff check ., 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)
  • 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 linked relevant sources that describes the added technique (blog posts, documentation, etc)
  • [ x] I have performed a self-review of my own code (not an AI review)
  • [x ] 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)

@Dfte Dfte changed the title Add exclude options Add exclude options based on @bdrogja's work https://github.com/Pennyw0rth/NetExec/pull/732 Apr 15, 2026
@NeffIsBack NeffIsBack changed the title Add exclude options based on @bdrogja's work https://github.com/Pennyw0rth/NetExec/pull/732 Add exclude options based on @bdrogja's work #732 Apr 15, 2026
@NeffIsBack
Copy link
Copy Markdown
Member

Nice! Thanks for the work.

@NeffIsBack
Copy link
Copy Markdown
Member

@Marshall-Hallenbeck the PR description check crashed again

@Dfte
Copy link
Copy Markdown
Contributor Author

Dfte commented Apr 15, 2026

@Marshall-Hallenbeck the PR description check crashed again

I think because I removed the setup #

@NeffIsBack
Copy link
Copy Markdown
Member

@Marshall-Hallenbeck the PR description check crashed again

I think because I removed the setup #

Naa it should comment and yell at you, not fail to run

@Dfte
Copy link
Copy Markdown
Contributor Author

Dfte commented Apr 17, 2026

Thinking of how I'd use this PR, I'd also add the options that were developed by @bdrojga vefor (--exlude-hosts and --skip-self)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip-self or exclude single IP

2 participants