Skip to content

Commit

Permalink
feat:async-runtime
Browse files Browse the repository at this point in the history
* feat: initial working labda

* chore: black

* fix: just return array

* chore: black

* feat: Attempt to async the code

* feat: Make async actually work

* feat: working

* chore: format

* lambda-req

* feat: speed improvements

* chore: black

* feat: abstract resolver

* chore: black

* testing: custom resolver

* chore:black

* feat: mx

* chore: black

* feat: fix tests

* chore: black

* fix: fixed mocks

* chore: black

* feat: bypass useragent filtering

* feat: add retry logic and fix sigs

* feat: optimise nx_domain

* feat: bump lambda

* chore: black

* feat: store results in dynamo

* feat: Tidy up codebase and async whois (#184)

* feat: Tidy up codebase and async whois

* feat: Run black

* feat: Address concerns over mocks.

* Update test action to install main requirements

* Cap parallel tests

* Make python verison tests more aggressive

---------

Co-authored-by: Brandon Hall <brandon.hall@punksecurity.co.uk>

* Some provider data/error improvements

* Explain why SSL validation is disabled

* Formatting

* Clean-up some code smells

* Clean-up lambda

* Fix lambda dockerfile path

* Fix cdockerfile lambda stage

* Reorder dockerfile?

---------

Co-authored-by: Alex Brozych <alex.brozych@punksecurity.co.uk>
Co-authored-by: alexbrozych <120374931+alexbrozych@users.noreply.github.com>
Co-authored-by: Brandon Hall <brandon.hall@punksecurity.co.uk>
  • Loading branch information
4 people authored Sep 10, 2024
1 parent d940025 commit 9af640a
Show file tree
Hide file tree
Showing 67 changed files with 1,781 additions and 736 deletions.
166 changes: 160 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,160 @@
.github
dev
docs
venv
tests
__pycache__/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Exclude Output
results.csv

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Pycharm
.idea

/build

.terraform

.terraform.lock.hcl

terraform.tfstate
.terraform.tfstate.lock.info
*.zip

pdkey

# exclude state
terraform.tfstate
terraform.tfstate.backup

#exclude other stuff
.github
.vscode
__pycache__
.git
dev
docs
#tests
48 changes: 24 additions & 24 deletions .github/actions/pytest/action.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: 'Python runtime test'
description: 'Test pwnSpoof against a given Python version'
inputs:
python-version:
description: 'Python version'
required: true
runs:
using: composite
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ inputs.python-version }}
- name: Python version
id: python-version
run: python --version
shell: bash
- name: install requirements
run: python -m pip install -r test-requirements.txt
shell: bash
- name: output tests
run: python -m pytest -v
shell: bash
name: 'Python runtime test'
description: 'Test pwnSpoof against a given Python version'
inputs:
python-version:
description: 'Python version'
required: true
runs:
using: composite
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ inputs.python-version }}
- name: Python version
id: python-version
run: python --version
shell: bash
- name: install requirements
run: python -m pip install -r requirements.txt -r test-requirements.txt
shell: bash
- name: output tests
run: python -m pytest -v
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/build_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
jobs:
pytest:
strategy:
max-parallel: 1
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
Expand All @@ -34,4 +35,3 @@ jobs:
VERSION: ${{ github.run_id }}
with:
targets: "preview"

Loading

0 comments on commit 9af640a

Please sign in to comment.