git: 7fdb824961b8 - main - security/py-nettacker: New port: Automated penetration testing and information-gathering framework

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Sat, 05 Sep 2026 19:37:28 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7fdb824961b80485c3da6cd4e8815b22c43fbafc

commit 7fdb824961b80485c3da6cd4e8815b22c43fbafc
Author:     Einar Bjarni Halldórsson <einar@isnic.is>
AuthorDate: 2026-09-05 16:09:19 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-09-05 19:34:45 +0000

    security/py-nettacker: New port: Automated penetration testing and information-gathering framework
    
    - Submitter becomes maintainer
    
    OWASP Nettacker is an open-source, Python-based automated penetration testing
    and information-gathering framework designed to help cyber security
    professionals and ethical hackers perform reconnaissance, vulnerability
    assessments, and network security audits efficiently.
    
    Nettacker automates tasks like port scanning, service detection, subdomain
    enumeration, network mapping, vulnerability scanning, credential brute-force
    testing making it a powerful tool for identifying weaknesses in networks, web
    applications, IoT devices and APIs.
    
    WWW:            https://owasp.org/nettacker
    PR:             297892
---
 security/Makefile                          |  1 +
 security/py-nettacker/Makefile             | 49 +++++++++++++++++++++++++++
 security/py-nettacker/distinfo             |  3 ++
 security/py-nettacker/files/patch-PULL1716 | 53 ++++++++++++++++++++++++++++++
 security/py-nettacker/pkg-descr            |  9 +++++
 5 files changed, 115 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 4e19d8eaf174..8114e9c0197b 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -1016,6 +1016,7 @@
     SUBDIR += py-netbox-secrets
     SUBDIR += py-nethsm
     SUBDIR += py-netmiko
+    SUBDIR += py-nettacker
     SUBDIR += py-nitrokey
     SUBDIR += py-noiseprotocol
     SUBDIR += py-notus-scanner
diff --git a/security/py-nettacker/Makefile b/security/py-nettacker/Makefile
new file mode 100644
index 000000000000..e4bf34ec263f
--- /dev/null
+++ b/security/py-nettacker/Makefile
@@ -0,0 +1,49 @@
+PORTNAME=	nettacker
+DISTVERSION=	0.4.1
+CATEGORIES=	security python
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	einar@isnic.is
+COMMENT=	Automated penetration testing and information-gathering framework
+WWW=		https://owasp.org/nettacker
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}aiohttp>=3.9.5:www/py-aiohttp@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}apsw>=3.50.0.0:databases/py-apsw@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}argparse>=1.4.0:devel/py-argparse@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}flask>=3.0.1:www/py-flask@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}impacket>=0.11.0:net/py-impacket@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}ipaddr>=2.2.0:devel/py-ipaddr@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}multiprocess>=0.70.15:devel/py-multiprocess@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}netaddr>=0.9.0:net/py-netaddr@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}paramiko>=3.4.0:security/py-paramiko@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}py3dns>=4.0.0:dns/py-py3dns@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pymysql>=1.1.1:databases/py-pymysql@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyopenssl>=23.2.0:security/py-pyopenssl@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pysocks>=1.7.1:net/py-pysocks@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyyaml>=6.0.1:devel/py-pyyaml@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>=2.32.3:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}sqlalchemy20>=2.0.22:databases/py-sqlalchemy20@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}texttable>=1.7.0:textproc/py-texttable@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}uvloop>=0.21.0:devel/py-uvloop@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}zipp>=3.19.1:devel/py-zipp@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-asyncio>0:devel/py-pytest-asyncio@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}schema>0:devel/py-schema@${PY_FLAVOR}
+
+USES=		python
+USE_GITHUB=	yes
+GH_ACCOUNT=	OWASP
+GH_PROJECT=	Nettacker
+USE_PYTHON=	autoplist concurrent pep517 pytest
+
+# Failed tests: https://github.com/OWASP/Nettacker/issues/1721
+PYTEST_IGNORED_TESTS=	test_create_tcp_socket \
+			test_logs_to_report_html_sqlite \
+			test_logs_to_report_html_sqlalchemy
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/security/py-nettacker/distinfo b/security/py-nettacker/distinfo
new file mode 100644
index 000000000000..4786a3e2db88
--- /dev/null
+++ b/security/py-nettacker/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1788340165
+SHA256 (OWASP-Nettacker-0.4.1_GH0.tar.gz) = 78397ad343c3b8f3b428953e9236ebf282d08a0e81e1c3102413e7bb411fb30e
+SIZE (OWASP-Nettacker-0.4.1_GH0.tar.gz) = 3484418
diff --git a/security/py-nettacker/files/patch-PULL1716 b/security/py-nettacker/files/patch-PULL1716
new file mode 100644
index 000000000000..2e173bedf42f
--- /dev/null
+++ b/security/py-nettacker/files/patch-PULL1716
@@ -0,0 +1,53 @@
+From 31658075bbc9215fb862ac777a1b2ba3bc1e2af8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Einar=20Bjarni=20Halld=C3=B3rsson?= <einar@isnic.is>
+Date: Thu, 3 Sep 2026 11:34:01 +0000
+Subject: [PATCH 1/2] Detect all current and future versions of FreeBSD
+
+---
+ nettacker/core/app.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git nettacker/core/app.py nettacker/core/app.py
+index 236d43101..0bd6c2c1c 100644
+--- nettacker/core/app.py
++++ nettacker/core/app.py
+@@ -66,7 +66,7 @@ def print_logo():
+         log.reset_color()
+ 
+     def check_dependencies(self):
+-        if sys.platform not in {"darwin", "freebsd13", "freebsd14", "freebsd15", "linux"}:
++        if sys.platform not in {"darwin", "linux"} and not sys.platform.startswith("freebsd"):
+             die_failure(_("error_platform"))
+ 
+         try:
+
+From 97c4ca25327881b0ac73a032a0ef38392c840753 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Einar=20Bjarni=20Halld=C3=B3rsson?= <einar@isnic.is>
+Date: Thu, 3 Sep 2026 11:35:19 +0000
+Subject: [PATCH 2/2] Update error message to add FreeBSD as a supported
+ platform
+
+---
+ nettacker/locale/en.yaml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git nettacker/locale/en.yaml nettacker/locale/en.yaml
+index 511d83808..660e78802 100644
+--- nettacker/locale/en.yaml
++++ nettacker/locale/en.yaml
+@@ -52,7 +52,7 @@ graph_output: to use graph feature your output filename must end with ".html" or
+ help_menu: Show Nettacker Help Menu
+ invalid_schema: "Invalid schema: Only 'http' and 'https' are allowed"
+ done: "done!"
+-error_platform: "Unfortunately, this version of the software can run on Linux/darwin"
++error_platform: "Unfortunately, this version of the software can run on Linux/darwin/freebsd"
+ file_saved: "report saved in {0} and database"
+ inserting_report_db: inserting report to the database
+ invalid_database: Please select from mysql or sqlite in the configuration file
+@@ -150,4 +150,4 @@ upload_invalid_filename: invalid filename
+ upload_file_type_not_allowed: file type not allowed
+ upload_invalid_param: invalid or missing upload parameter
+ upload_token_invalid: invalid or expired upload token
+-upload_file_not_found: uploaded file not found or expired
+\ No newline at end of file
++upload_file_not_found: uploaded file not found or expired
diff --git a/security/py-nettacker/pkg-descr b/security/py-nettacker/pkg-descr
new file mode 100644
index 000000000000..dc9909081610
--- /dev/null
+++ b/security/py-nettacker/pkg-descr
@@ -0,0 +1,9 @@
+OWASP Nettacker is an open-source, Python-based automated penetration testing
+and information-gathering framework designed to help cyber security
+professionals and ethical hackers perform reconnaissance, vulnerability
+assessments, and network security audits efficiently.
+
+Nettacker automates tasks like port scanning, service detection, subdomain
+enumeration, network mapping, vulnerability scanning, credential brute-force
+testing making it a powerful tool for identifying weaknesses in networks, web
+applications, IoT devices and APIs.