Skip to content

Commit

Permalink
Merge pull request #52 from Pennyw0rth/feature/linux_build
Browse files Browse the repository at this point in the history
Finalize Native Builds
  • Loading branch information
Marshall-Hallenbeck authored Oct 1, 2023
2 parents 310d178 + bf91d6d commit 72e42e9
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 97 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/netexec-build-zipapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build ZippApps

on:
workflow_dispatch:

jobs:
build:
name: Building Python ZipApp on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: NetExec set up python on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build Python ZipApp with Shiv
run: |
pip install shiv
python build_collector.py
- name: Upload nxc ZipApp
uses: actions/upload-artifact@v3
with:
name: nxc-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxc
- name: Upload nxcdb ZipApp
uses: actions/upload-artifact@v3
with:
name: nxcdb-zipapp-${{ matrix.os }}-${{ matrix.python-version }}
path: bin/nxcdb
37 changes: 37 additions & 0 deletions .github/workflows/netexec-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Binaries

on:
workflow_dispatch:

jobs:
build:
name: Building Binary on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.11"]
#python-version: ["3.8", "3.9", "3.10", "3.11"] # for binary builds we only need one version
steps:
- uses: actions/checkout@v3
- name: NetExec set up python on ${{ matrix.os }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build Native Binary
run: |
pip install pyinstaller
pip install .
pyinstaller netexec.spec
- name: Upload Windows Binary
if: runner.os == 'windows'
uses: actions/upload-artifact@v3
with:
name: nxc.exe
path: dist/nxc.exe
- name: Upload Nix/OSx Binary
if: runner.os != 'windows'
uses: actions/upload-artifact@v3
with:
name: nxc-${{ matrix.os }}
path: dist/nxc
45 changes: 0 additions & 45 deletions .github/workflows/netexec.yml

This file was deleted.

104 changes: 52 additions & 52 deletions netexec.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,57 +13,57 @@ a = Analysis(
('./nxc/modules', 'nxc/modules')
],
hiddenimports=[
'impacket.examples.secretsdump',
'impacket.dcerpc.v5.lsat',
'impacket.dcerpc.v5.transport',
'impacket.dcerpc.v5.lsad',
'impacket.dcerpc.v5.gkdi',
'impacket.dcerpc.v5.rprn',
'impacket.dpapi_ng',
'impacket.tds',
'impacket.version',
'impacket.ldap.ldap',
'nxc.connection',
'nxc.servers.smb',
'nxc.protocols.smb.wmiexec',
'nxc.protocols.smb.atexec',
'nxc.protocols.smb.smbexec',
'nxc.protocols.smb.mmcexec',
'nxc.protocols.smb.smbspider',
'nxc.protocols.smb.passpol',
'nxc.protocols.mssql.mssqlexec',
'nxc.helpers.bash',
'nxc.helpers.bloodhound',
'nxc.helpers.msada_guids',
'paramiko',
'pypsrp.client',
'pywerview.cli.helpers',
'pylnk3',
'pypykatz',
'masky',
'msldap',
'msldap.connection',
'lsassy',
'lsassy.dumper',
'lsassy.parser',
'lsassy.session',
'lsassy.impacketfile',
'dns',
'dns.name',
'dns.resolver',
'dploot',
'dploot.triage',
'dploot.triage.rdg',
'dploot.triage.vaults',
'dploot.triage.browser',
'dploot.triage.credentials',
'dploot.triage.masterkeys',
'dploot.triage.backupkey',
'dploot.triage.wifi',
'dploot.lib.target',
'dploot.lib.smb',
'pyasn1_modules.rfc5652',
'unicrypto.backends.pycryptodomex',
'impacket.examples.secretsdump',
'impacket.dcerpc.v5.lsat',
'impacket.dcerpc.v5.transport',
'impacket.dcerpc.v5.lsad',
'impacket.dcerpc.v5.gkdi',
'impacket.dcerpc.v5.rprn',
'impacket.dpapi_ng',
'impacket.tds',
'impacket.version',
'impacket.ldap.ldap',
'nxc.connection',
'nxc.servers.smb',
'nxc.protocols.smb.wmiexec',
'nxc.protocols.smb.atexec',
'nxc.protocols.smb.smbexec',
'nxc.protocols.smb.mmcexec',
'nxc.protocols.smb.smbspider',
'nxc.protocols.smb.passpol',
'nxc.protocols.mssql.mssqlexec',
'nxc.helpers.bash',
'nxc.helpers.bloodhound',
'nxc.helpers.msada_guids',
'paramiko',
'pypsrp.client',
'pywerview.cli.helpers',
'pylnk3',
'pypykatz',
'masky',
'msldap',
'msldap.connection',
'lsassy',
'lsassy.dumper',
'lsassy.parser',
'lsassy.session',
'lsassy.impacketfile',
'dns',
'dns.name',
'dns.resolver',
'dploot',
'dploot.triage',
'dploot.triage.rdg',
'dploot.triage.vaults',
'dploot.triage.browser',
'dploot.triage.credentials',
'dploot.triage.masterkeys',
'dploot.triage.backupkey',
'dploot.triage.wifi',
'dploot.lib.target',
'dploot.lib.smb',
'pyasn1_modules.rfc5652',
'unicrypto.backends.pycryptodomex',
],
hookspath=['./nxc/.hooks'],
runtime_hooks=[],
Expand All @@ -85,7 +85,7 @@ exe = EXE(
a.zipfiles,
a.datas,
[],
name='netexec',
name='nxc',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand Down
Binary file modified nxc/data/nxc.ico
Binary file not shown.

0 comments on commit 72e42e9

Please sign in to comment.