Skip to content

Commit

Permalink
First code
Browse files Browse the repository at this point in the history
  • Loading branch information
Startr4ck authored and Startr4ck committed May 11, 2024
1 parent e026dc2 commit 39bf3c1
Show file tree
Hide file tree
Showing 310 changed files with 165,265 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

### Configuration
impacket version:
Python version:
Target OS:

### Debug Output With Command String
i.e.
smbexec -debug domain/user:password@127.0.0.1
```
smbexec -debug domain/user:[email protected]
[+] StringBinding ncacn_np:127.0.0.1[\pipe\svcctl]
[+] Executing %COMSPEC% /Q /c echo cd ^> \\127.0.0.1\C$\__output 2^>^&1 > %TEMP%\execute.bat & %COMSPEC% /Q /c %TEMP%\execute.bat & del %TEMP%\execute.bat
[!] Launching semi-interactive shell - Careful what you execute
C:\Windows\system32>net group
[+] Executing %COMSPEC% /Q /c echo net group ^> \\127.0.0.1\C$\__output 2^>^&1 > %TEMP%\execute.bat & %COMSPEC% /Q /c %TEMP%\execute.bat & del %TEMP%\execute.bat
Traceback (most recent call last):
File "/usr/lib64/python3.7/cmd.py", line 214, in onecmd
func = getattr(self, 'do_' + cmd)
AttributeError: 'RemoteShell' object has no attribute 'do_net'
```

### PCAP
If applicable, add a packet capture to help explain your problem.

### Additional context
Space for additional context, investigative results, suspected issue.
24 changes: 24 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Rules to label Pull Requests
version: 1
labels:
- label: "Examples"
files:
- "examples/.*"
- label: "Library"
files:
- "impacket/.*"
- label: "CI/CD & Tests"
files:
- "tests/.*"
- "tox.ini"
- "Dockerfile"
- ".github/.*"
- label: "Setup"
files:
- "setup.py"
- "requirements*.txt"
- "MANIFEST.in"
- label: "Docs"
files:
- "*.md"
- "LICENSE"
95 changes: 95 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# GitHub Action workflow to build and run Impacket's tests
#

name: Build and test Impacket

on: [push, pull_request]

env:
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:
python-version: ["3.6", "3.7", "3.8", "3.9"]
experimental: [false]
include:
- python-version: "3.10"
experimental: true
continue-on-error: ${{ matrix.experimental }}

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

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip wheel
python -m pip install tox tox-gh-actions -r requirements.txt -r requirements-test.txt
- name: Run unit tests
run: |
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
uses: actions/checkout@v2

- name: Build docker image
run: |
docker build -t ${{ env.DOCKER_TAG }} .
15 changes: 15 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GitHub Action workflow to label Pull Requests
#

name: Label PRs

on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: srvaroa/labeler@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
75 changes: 75 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
venv/
.env/
.venv/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

Pipfile
Pipfile.lock

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# bak files
*.bak

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# macOS
.DS_Store

# PyCharm
.idea

# Test cases configuration
tests/dcetests.cfg
Loading

0 comments on commit 39bf3c1

Please sign in to comment.