git: 6da2b6f73dea - main - security/ismtp: Test for SMTP user enumeration, internal spoofing, and relay

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Thu, 18 May 2023 08:20:33 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6da2b6f73deac292a7b27e64105dfd26d12f46ea

commit 6da2b6f73deac292a7b27e64105dfd26d12f46ea
Author:     rihaz jerrin <rihaz.jerrin@gmail.com>
AuthorDate: 2023-05-15 02:54:06 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-05-18 08:19:42 +0000

    security/ismtp: Test for SMTP user enumeration, internal spoofing, and relay
    
    SMTP user enumeration (RCPT TO and VRFY), internal spoofing, and open
    relay.  A tool that tests for all three and comes with great
    flexibility. iSMTP does just that, making it much easier to knock that
    process out of the way.
    
    WWW: https://github.com/altjx/ipwn/tree/master/iSMTP
    
    PR:             270304
---
 MOVED                                     |  1 -
 security/Makefile                         |  1 +
 security/ismtp/Makefile                   | 29 +++++++++++++++++++++++++++++
 security/ismtp/distinfo                   |  3 +++
 security/ismtp/files/patch-iSMTP_iSMTP.py | 18 ++++++++++++++++++
 security/ismtp/pkg-descr                  |  4 ++++
 6 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/MOVED b/MOVED
index fc285f8cbaa7..b73f81847c53 100644
--- a/MOVED
+++ b/MOVED
@@ -5049,7 +5049,6 @@ ports-mgmt/portell||2020-09-19|Has expired: Uses deprecated version of python
 print/biblio-py||2020-09-19|Has expired: Uses deprecated version of python
 science/brian||2020-09-19|Has expired: Uses deprecated version of python
 security/arm||2020-09-19|Has expired: Uses deprecated version of python
-security/ismtp||2020-09-19|Has expired: Uses deprecated version of python
 security/py-halberd||2020-09-19|Has expired: Uses deprecated version of python
 security/switzerland||2020-09-19|Has expired: Uses deprecated version of python
 security/tsshbatch||2020-09-19|Has expired: Uses deprecated version of python
diff --git a/security/Makefile b/security/Makefile
index 0e41ec96cb27..3de8d80b0643 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -238,6 +238,7 @@
     SUBDIR += ipsec-tools
     SUBDIR += ipv6toolkit
     SUBDIR += isal-kmod
+    SUBDIR += ismtp
     SUBDIR += isnprober
     SUBDIR += john
     SUBDIR += kbfsd
diff --git a/security/ismtp/Makefile b/security/ismtp/Makefile
new file mode 100644
index 000000000000..d636a9fa0f70
--- /dev/null
+++ b/security/ismtp/Makefile
@@ -0,0 +1,29 @@
+PORTNAME=	ismtp
+DISTVERSION=	g20190921
+CATEGORIES=	security
+
+MAINTAINER=	rihaz.jerrin@gmail.com
+COMMENT=	Test for SMTP user enumeration, internal spoofing, and relay
+WWW=		https://github.com/altjx/ipwn/tree/master/iSMTP
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/iSMTP/LICENSE.md
+
+USES=		python:3.0+ shebangfix
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	altjx
+GH_PROJECT=	ipwn
+GH_TAGNAME=	18198ad887c2d7e59c05b3f860d92e56f54d9144
+
+SHEBANG_FILES=	${WRKSRC}/iSMTP/iSMTP.py
+
+NO_ARCH=	yes
+NO_BUILD=	yes
+
+PLIST_FILES=	bin/ismtp
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/iSMTP/iSMTP.py  ${STAGEDIR}${PREFIX}/bin/ismtp
+
+.include <bsd.port.mk>
diff --git a/security/ismtp/distinfo b/security/ismtp/distinfo
new file mode 100644
index 000000000000..bc22582dc7cf
--- /dev/null
+++ b/security/ismtp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1684157212
+SHA256 (altjx-ipwn-g20190921-18198ad887c2d7e59c05b3f860d92e56f54d9144_GH0.tar.gz) = 94ad381c1405e097958d364e6505d07d065e1463dc2094e86cd2fb1bd158231a
+SIZE (altjx-ipwn-g20190921-18198ad887c2d7e59c05b3f860d92e56f54d9144_GH0.tar.gz) = 44500
diff --git a/security/ismtp/files/patch-iSMTP_iSMTP.py b/security/ismtp/files/patch-iSMTP_iSMTP.py
new file mode 100644
index 000000000000..8ae448a0c2e2
--- /dev/null
+++ b/security/ismtp/files/patch-iSMTP_iSMTP.py
@@ -0,0 +1,18 @@
+--- iSMTP/iSMTP.py.orig	2023-03-18 07:13:19 UTC
++++ iSMTP/iSMTP.py
+@@ -29,13 +29,13 @@ class colors:
+ 	green = "\033[1;32m"
+ 
+ start_time = time.time()
+-banner = "\n " + "-" * 69 + "\n " + colors.white + " iSMTP v1.6 - SMTP Server Tester, Alton Johnson (alton.jx@gmail.com)\n " + colors.normal + "-" * 69 + "\n "
++banner = "\n " + "-" * 69 + "\n " + colors.white + " SMTP Server Tester \n"  + colors.normal + "-" * 69 + "\n "
+ split_service = "\n " + colors.white + "-" * 10 + " starting next test " + "-" * 10 + colors.normal + "\n"
+ split_target = "\n " + colors.white + "=" * 23 + " starting next target " + "=" * 23 + colors.normal + "\n"
+ 
+ def help():
+ 	print(banner)
+-	print(" Usage: ./iSMTP.py <OPTIONS>\n")
++	print(" Usage: ismtp  <OPTIONS>\n")
+ 	print(colors.red + " Required:\n" + colors.normal)
+ 	print("\t-f <import file>\tImports a list of SMTP servers for testing.\n\t\t\t\t(Cannot use with '-h'.)")
+ 	print("\t-h <host>\t\tThe target IP and port (IP:port).\n\t\t\t\t(Cannot use with '-f'.)")
diff --git a/security/ismtp/pkg-descr b/security/ismtp/pkg-descr
new file mode 100644
index 000000000000..a5fb86f93434
--- /dev/null
+++ b/security/ismtp/pkg-descr
@@ -0,0 +1,4 @@
+SMTP user enumeration (RCPT TO and VRFY), internal spoofing, and open
+relay.  A tool that tests for all three and with great flexibility.
+iSMTP does just that, making it much easier to knock that process out
+of the way.