Skip to content

Commit aa68664

Browse files
authored
Merge branch 'main' into SMB]-Rework-the-runasppl-module
Signed-off-by: mpgn <5891788+mpgn@users.noreply.github.com>
2 parents 3c19763 + c9ce989 commit aa68664

48 files changed

Lines changed: 2024 additions & 1482 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md renamed to .github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
---
2-
name: Pull request
3-
about: Update code to fix a bug or add an enhancement/feature
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
8-
---
91
## Description
102

113
Please include a summary of the change and which issue is fixed, or what the enhancement does.

.github/workflows/build-binaries.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
python-version: ["3.11"]
13+
python-version: ["3.12"]
1414
#python-version: ["3.8", "3.9", "3.10", "3.11"] # for binary builds we only need one version
1515
steps:
1616
- uses: actions/checkout@v4
@@ -25,13 +25,13 @@ jobs:
2525
pyinstaller netexec.spec
2626
- name: Upload Windows Binary
2727
if: runner.os == 'windows'
28-
uses: actions/upload-artifact@v3
28+
uses: actions/upload-artifact@v4
2929
with:
3030
name: nxc.exe
3131
path: dist/nxc.exe
3232
- name: Upload Nix/OSx Binary
3333
if: runner.os != 'windows'
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: nxc-${{ matrix.os }}
3737
path: dist/nxc

.github/workflows/build-zipapps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
python-version: ["3.8", "3.9", "3.10", "3.11"]
13+
python-version: ["3.10", "3.11", "3.12"]
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: NetExec set up python on ${{ matrix.os }}
@@ -22,12 +22,12 @@ jobs:
2222
pip install shiv
2323
python build_collector.py
2424
- name: Upload nxc ZipApp
25-
uses: actions/upload-artifact@v3
25+
uses: actions/upload-artifact@v4
2626
with:
2727
name: nxc-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
2828
path: bin/nxc
2929
- name: Upload nxcdb ZipApp
30-
uses: actions/upload-artifact@v3
30+
uses: actions/upload-artifact@v4
3131
with:
3232
name: nxcdb-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
3333
path: bin/nxcdb

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
22-
python-version: 3.11
22+
python-version: 3.12
2323
cache: poetry
2424
cache-dependency-path: poetry.lock
2525
- name: Install dependencies with dev group

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
max-parallel: 5
1515
matrix:
1616
os: [ubuntu-latest]
17-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.10", "3.11", "3.12"]
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Install poetry

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Supported Python versions](https://img.shields.io/badge/python-3.8+-blue.svg)
1+
![Supported Python versions](https://img.shields.io/badge/python-3.10+-blue.svg)
22
[![Twitter](https://img.shields.io/twitter/follow/al3xn3ff?label=al3x_n3ff&style=social)](https://twitter.com/intent/follow?screen_name=al3x_n3ff)
33
[![Twitter](https://img.shields.io/twitter/follow/_zblurx?label=_zblurx&style=social)](https://twitter.com/intent/follow?screen_name=_zblurx)
44
[![Twitter](https://img.shields.io/twitter/follow/MJHallenbeck?label=MJHallenbeck&style=social)](https://twitter.com/intent/follow?screen_name=MJHallenbeck)

netexec.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ a = Analysis(
2525
'impacket.dcerpc.v5.lsad',
2626
'impacket.dcerpc.v5.gkdi',
2727
'impacket.dcerpc.v5.rprn',
28+
'impacket.dcerpc.v5.even',
2829
'impacket.dpapi_ng',
2930
'impacket.tds',
3031
'impacket.version',
@@ -48,6 +49,7 @@ a = Analysis(
4849
'pywerview.cli.helpers',
4950
'pylnk3',
5051
'pypykatz',
52+
'pyNfsClient',
5153
'masky',
5254
'msldap',
5355
'msldap.connection',

nxc/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def gen_cli_args():
2222
except ValueError:
2323
VERSION = importlib.metadata.version("netexec")
2424
COMMIT = ""
25-
CODENAME = "ItsAlwaysDNS"
25+
CODENAME = "NeedForSpeed"
2626
nxc_logger.debug(f"NXC VERSION: {VERSION} - {CODENAME} - {COMMIT}")
2727

2828
generic_parser = argparse.ArgumentParser(add_help=False, formatter_class=DisplayDefaultsNotNone)

nxc/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def proto_flow(self):
229229
else:
230230
self.logger.debug("Created connection object")
231231
self.enum_host_info()
232-
if self.print_host_info() and (self.login() or (self.username == "" and self.password == "")):
232+
self.print_host_info()
233+
if self.login() or (self.username == "" and self.password == ""):
233234
if hasattr(self.args, "module") and self.args.module:
234235
self.load_modules()
235236
self.logger.debug("Calling modules")

nxc/helpers/args.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from argparse import ArgumentDefaultsHelpFormatter, SUPPRESS, OPTIONAL, ZERO_OR_MORE
2+
from argparse import Action
23

34
class DisplayDefaultsNotNone(ArgumentDefaultsHelpFormatter):
45
def _get_help_string(self, action):
@@ -7,4 +8,18 @@ def _get_help_string(self, action):
78
defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
89
if (action.option_strings or action.nargs in defaulting_nargs) and action.default: # Only add default info if it's not None
910
help_string += " (default: %(default)s)" # NORUFF
10-
return help_string
11+
return help_string
12+
13+
14+
class DefaultTrackingAction(Action):
15+
def __init__(self, option_strings, dest, default=None, required=False, **kwargs):
16+
# Store the default value to check later
17+
self.default_value = default
18+
super().__init__(
19+
option_strings, dest, default=default, required=required, **kwargs
20+
)
21+
22+
def __call__(self, parser, namespace, values, option_string=None):
23+
# Set an attribute to track whether the value was explicitly set
24+
setattr(namespace, self.dest, values)
25+
setattr(namespace, f"{self.dest}_explicitly_set", True)

0 commit comments

Comments
 (0)