diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..dd0767d --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 160 +exclude = docs/*, .git, __pycache__, build diff --git a/.gitignore b/.gitignore index 68bc17f..e05e2e7 100644 --- a/.gitignore +++ b/.gitignore @@ -158,3 +158,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6ed3078 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,28 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/asottile/reorder_python_imports + rev: v3.9.0 + hooks: + - id: reorder-python-imports + args: [--application-directories, '.:drawbridge', --py39-plus] +- repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + language_version: python3.11 +- repo: https://github.com/PyCQA/bandit + rev: 1.7.5 + hooks: + - id: bandit + args: ["-c", "pyproject.toml"] + additional_dependencies: ["bandit[toml]"] +- repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 diff --git a/README.md b/README.md new file mode 100644 index 0000000..8a3bca3 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +
+drawbridge Logo + +# drawbridge + +drawbridge description + +and witty subtitle
+ +[Installation](#installation) • +[Examples](#examples) • +[Frequently Asked Questions](#faq) • +[Contributing](#contributing) • +[License](#license) +
+ +## Installation + +### with pip +TBD + +## Examples + +TBD + +## FAQ + +**What problem does drawbridge solve?** + +TBD + +**What's your roadmap?** + +TBD + +## Contributing + +If you would like to contribute to this project, feel free to submit a pull request or open an issue on GitHub. + +This tool was written as part of my coursework for CSC 842 - Security Tool Development at Dakota State University. Consequently, I may choose not to maintain this tool beyond the length of the course, but have selected a license that enables open contributions in any case. + +## License + +This project is licensed under the MIT License. See the `LICENSE` file for details. diff --git a/drawbridge.png b/drawbridge.png new file mode 100644 index 0000000..3c624f3 Binary files /dev/null and b/drawbridge.png differ diff --git a/drawbridge/__init__.py b/drawbridge/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4c5d269 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ +[build-system] +requires = ["setuptools>=67.8"] +build-backend = "setuptools.build_meta" + +[project] +name = "drawbridge" +version = "0.0.1" +authors = [{ name = "drawbridge", email = "git@nixon.mozmail.com" }] +description = "An nfqueue abstraction module for building security tools" +readme = "README.md" +requires-python = ">=3.9" +license = { text = "GPLv3" } +dependencies = [ + "fnfqueue>=1.1.2", + "scapy>=2.5.0", + "python-iptables>=1.0.1", + "loguru>=0.7.0", +] + +[project.urls] +homepage = "https://github.com/DarrylNixon/drawbridge" +repository = "https://github.com/DarrylNixon/drawbridge" + +[tool.setuptools] +py-modules = ["drawbridge"] + +[tool.bandit] +exclude_dirs = ["/doc", "/build"] +# TODO: Stop skipping B104 (binding on 0.0.0.0), is there a nice way to get a good docker bind address? +skips = ["B104"] + +[tool.black] +line-length = 120