Skip to content

Commit

Permalink
Merge branch 'SecureAuthCorp:master' into findDelegation
Browse files Browse the repository at this point in the history
  • Loading branch information
ShutdownRepo authored Feb 5, 2022
2 parents 4bc842d + ed7082c commit 3c9432e
Show file tree
Hide file tree
Showing 119 changed files with 5,684 additions and 6,181 deletions.
56 changes: 44 additions & 12 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,54 @@ name: Build and test Impacket
on: [push, pull_request]

env:
NO_REMOTE: true
DOCKER_TAG: impacket:latests

jobs:
lint:
name: Check syntaxs errors and warnings
runs-on: ubuntu-latest
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

steps:
- name: Checkout Impacket
uses: actions/checkout@v2

- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install Python dependencies
run: |
python -m pip install flake8
- name: Check syntax errors
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Check PEP8 warnings
run: |
flake8 . --count --ignore=E1,E2,E3,E501,W291,W293 --exit-zero --max-complexity=65 --max-line-length=127 --statistics
test:
name: Run unit tests and build wheel
needs: lint
runs-on: ubuntu-latest
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

strategy:
fail-fast: false
matrix:
tox-env: [py27, py36, py37, py38]
tox-env: [py36, py37, py38, py39]
experimental: [false]
include:
- tox-env: py27
python-version: 2.7
experimental: true
- tox-env: py36
python-version: 3.6
- tox-env: py37
Expand All @@ -29,6 +62,8 @@ jobs:
python-version: 3.8
- tox-env: py39
python-version: 3.9
- tox-env: py310
python-version: "3.10"
experimental: true
env:
TOXENV: ${{ matrix.tox-env }}
Expand All @@ -46,27 +81,24 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install flake8 tox -r requirements.txt
- name: Check syntax errors
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Check PEP8 warnings
run: |
flake8 . --count --ignore=E1,E2,E3,E501,W291,W293 --exit-zero --max-complexity=65 --max-line-length=127 --statistics
python -m pip install tox -r requirements.txt -r requirements-test.txt
- name: Run unit tests
run: |
tox
tox -- -m 'not remote'
- name: Build wheel artifact
run: |
python setup.py bdist_wheel
docker:
name: Build docker image
needs: lint
runs-on: ubuntu-latest
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

continue-on-error: true
steps:
- name: Checkout Impacket
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ target/

# PyCharm
.idea

# Test cases configuration
tests/dcetests.cfg
16 changes: 13 additions & 3 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,25 @@ Complete list of changes can be found at:
https://github.com/SecureAuthCorp/impacket/commits/master

## Unreleased changes
1. Library improvements
* Added a function to compute the Netlogon Authenticator at client-side in `[MS-NRPC]` (@0xdeaddood)
* Added `[MS-DSSP]` protocol implementation (@simondotsh)
* Added GetDriverDirectory functions to `[MS-PAR]` and `[MS-RPRN]` (@raithedavion)

2. Examples improvements
* [ntlmrelayx.py](examples/ntlmrelayx.py):
* Implemented RAWRelayServer (@CCob)

3. New examples
* [machine_role.py](examples/machine_role.py): This script retrieves a host's role along with its primary domain details (@simondotsh)

## Impacket v0.9.24 (October 2021):

1. Library improvements
* Fixed WMI objects parsing (@franferrax)
* Added the RpcAddPrinterDriverEx method and related structures to [MS-RPRN]: Print System Remote Protocol (@cube0x0)
* Initial implementation of [MS-PAR]: Print System Asynchronous Remote Protocol (@cube0x0)
* Complying MS-RPCH with HTTP/1.1 (@mohemiv)
* Added the RpcAddPrinterDriverEx method and related structures to `[MS-RPRN]`: Print System Remote Protocol (@cube0x0)
* Initial implementation of `[MS-PAR]`: Print System Asynchronous Remote Protocol (@cube0x0)
* Complying `[MS-RPCH]` with HTTP/1.1 (@mohemiv)
* Added return of server time in case of Kerberos error (@ShutdownRepo and @Hackndo)

2. Examples improvements
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include LICENSE
include ChangeLog.md
include README.md
include SECURITY.md
include TESTING.md

include requirements.txt

Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,24 @@ write there.
Testing
-------

If you want to run the library test cases you need to do mainly three things:
The library leverages the [pytest](https://docs.pytest.org/) framework for organizing
and marking test cases, [tox](https://tox.readthedocs.io/) to automate the process of
running them across supported Python versions, and [coverage](https://coverage.readthedocs.io/)
to obtain coverage statistics.

1. Install and configure a Windows 2012 R2 Domain Controller.
* Be sure the RemoteRegistry service is enabled and running.
2. Configure the [dcetest.cfg](https://github.com/SecureAuthCorp/impacket/blob/impacket_0_9_24/tests/SMB_RPC/dcetests.cfg) file with the necessary information
3. Install tox (`python3 -m pip install tox`)
A [comprehensive testing guide](TESTING.md) is available.

Once that's done, you can run `tox` and wait for the results. If all goes well, all test cases should pass.
You will also have a coverage HTML report located at `impacket/tests/htlmcov/index.html`

Docker Support
--------------

Build Impacket's image:

docker build -t "impacket:latest" .
$ docker build -t "impacket:latest" .

Using Impacket's image:

docker run -it --rm "impacket:latest"
$ docker run -it --rm "impacket:latest"

Licensing
=========
Expand Down
Loading

0 comments on commit 3c9432e

Please sign in to comment.