Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for packaging #756

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "nettacker"
maintainers = [ { name = "OWASP" } ]
version = "0.3.1"
description = "Automated Penetration Testing Framework - Open-Source Vulnerability Scanner - Vulnerability Management"
keywords = [
"python",
"security",
"automation",
"scanner",
"bruteforce",
"owasp",
"penetration-testing",
"pentesting",
"cve",
"network-analysis",
"vulnerability-management",
"vulnerability-scanners",
"information-gathering",
"portscanner ",
"security-tools",
"vulnerability-scanner",
"penetration-testing-framework",
"hacking-tools",
"pentesting-tools",
"cves",
]
readme = "README.md"
requires-python = ">=3.7"
license = { file = "LICENSE" }
dependencies = [
"argparse==1.4.0",
"netaddr==0.9.0",
"ipaddr==2.2.0",
"requests==2.31.0",
"aiohttp==3.8.5",
"asyncio==3.4.3",
"paramiko==3.3.1",
"texttable==1.6.7",
"PySocks==1.7.1" ,
"pyOpenSSL==23.2.0",
"flask==3.0.0",
"SQLAlchemy>=1.4.43",
"py3DNS==4.0.0" ,
"numpy==1.26.0",
"terminable_thread==0.7.1",
"PyYAML==6.0.1",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache-2.0 license",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It deserves the security topic:

Suggested change
"Development Status :: 5 - Production/Stable",
"Development Status :: 5 - Production/Stable",
"Topic :: Security",

You can find more here -- https://pypi.org/pypi?%3Aaction=list_classifiers

]

[project.optional-dependencies]
test = ["tests"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like an optional dependency to me.


[project.urls]
"Homepage" = "https://owasp.org/www-project-nettacker/"
"Bug Reports" = "https://github.com/OWASP/Nettacker/issues"
"Funding" = "https://owasp.org/donate/?reponame=www-project-nettacker&title=OWASP+Nettacker"
"Source" = "https://github.com/OWASP/Nettacker"

[tool.setuptools.packages.find]
where = ["."]
include = [
"api",
"core",
"database",
"lib",
"modules",
]

[tool.poetry]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not that familiar w/ poetry to make any strong suggestions here. However, this file doesn't look right from DRY perspective. Essentially, you have pretty much the same contents for both [project] and [tool.poetry] sections. Is there a way to avoid that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poetry is a relatively new and clean package manager for Python which comes with several advantages over pip and it is using pyproject.toml - my problem with accepting both PRs is that they are not properly tested and perhaps submitted without proper understanding of the Poetry concepts and avoiding repetition - thanks for your review and pointing our the DRY principle.

https://blogs.sap.com/2022/05/08/why-you-should-use-poetry-instead-of-pip-or-conda-for-python-projects/

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my problem with accepting both PRs is that they are not properly tested and perhaps submitted without proper understanding of the Poetry concepts and avoiding repetition

I see what you're saying. I may be able to look into consolidating and testing these PRs code to resolve your concerns this/next week.

// thanks for the link!

name = "nettacker"
authors = [ "OWASP" ]
version = "0.3.1"
description = "Automated Penetration Testing Framework - Open-Source Vulnerability Scanner - Vulnerability Management"
keywords = [
"python",
"security",
"automation",
"scanner",
"bruteforce",
"owasp",
"penetration-testing",
"pentesting",
"cve",
"network-analysis",
"vulnerability-management",
"vulnerability-scanners",
"information-gathering",
"portscanner ",
"security-tools",
"vulnerability-scanner",
"penetration-testing-framework",
"hacking-tools",
"pentesting-tools",
"cves",
]
readme = "README.md"
license = "Apache-2.0"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
]

[tool.poetry.dependencies]
python = "^3.7"
argparse = "^1.4.0"
netaddr = "^0.9.0"
ipaddr = "^2.2.0"
requests = "^2.31.0"
aiohttp = "^3.8.5"
asyncio = "^3.4.3"
paramiko = "^3.3.1"
texttable = "^1.6.7"
PySocks = "^1.7.1"
pyOpenSSL = "^23.2.0"
flask = "^3.0.0"
SQLAlchemy = "^1.4.43"
py3DNS = "^4.0.0"
numpy = "^1.26.0"
terminable_thread = "^0.7.1"
PyYAML = "^6.0.1"