1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

Add smtpscan 0.3.1, a remote SMTP server version detector.

PR:		46221
Submitted by:	Hubert Tournier <hubert@frbsd.org>
This commit is contained in:
Munechika SUMIKAWA 2003-04-19 21:37:11 +00:00
parent 605eca3b12
commit ffd50101dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=79316
8 changed files with 160 additions and 0 deletions

View File

@ -306,6 +306,7 @@
SUBDIR += skip
SUBDIR += slurpie
SUBDIR += slush
SUBDIR += smtpscan
SUBDIR += smurflog
SUBDIR += sniff
SUBDIR += snort

View File

@ -0,0 +1,27 @@
# New ports collection makefile for: smtpscan
# Date created: 1 decembre 2002
# Whom: Hubert Tournier <hubert@frbsd.org>
#
# $FreeBSD$
#
PORTNAME= smtpscan
PORTVERSION= 0.3.1
CATEGORIES= security mail perl5
MASTER_SITES= http://www.greyhats.org/outils/smtpscan/
MAINTAINER= hubert@frbsd.org
COMMENT= A remote SMTP server version detector
RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Getopt/Long.pm:${PORTSDIR}/devel/p5-Getopt-Long \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/i386-freebsd/IO.pm:${PORTSDIR}/devel/p5-IO \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/DNS.pm:${PORTSDIR}/net/p5-Net-DNS
USE_PERL5= yes
MAN1= smtpscan.1
WRKSRC= ${WRKDIR}/${PORTNAME}
pre-build:
${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (smtpscan-0.3.1.tar.gz) = 86f5af132f674ba85ab1267b4d69d159

View File

@ -0,0 +1,7 @@
#$FreeBSD$
all:
./configure build
install:
./configure install

View File

@ -0,0 +1,77 @@
--- configure.orig Sun Dec 1 19:13:29 2002
+++ configure Sun Dec 1 19:17:43 2002
@@ -9,42 +9,51 @@
BINDIR="$DESTDIR/bin"
MANDIR="$DESTDIR/man/man1"
-echo "Installing smtpscan..."
-echo " Using directory $DESTDIR"
+#echo "Installing smtpscan..."
+#echo " Using directory $DESTDIR"
-echo -n " Checking for Net::DNS ... "
-perl -MNet::DNS -e '' >/dev/null 2>&1
-if [ $? != 0 ]
-then
- echo ""
- echo ""
- echo " !!! ERROR !!!"
- echo " Net::DNS not found"
- echo " You are strongly adviced to install it !"
-
- echo " Net::DNS is included in the smtpscan distribution"
- echo " To install it, just make :"
- echo " # tar zxvf Net-DNS-0.29.tar.gz"
- echo " # cd Net-DNS-0.29"
- echo " # perl Makefile.PL"
- echo " # make"
- echo " # make install"
- exit
-fi
+#echo -n " Checking for Net::DNS ... "
+#perl -MNet::DNS -e '' >/dev/null 2>&1
+#if [ $? != 0 ]
+#then
+# echo ""
+# echo ""
+# echo " !!! ERROR !!!"
+# echo " Net::DNS not found"
+# echo " You are strongly adviced to install it !"
+#
+# echo " Net::DNS is included in the smtpscan distribution"
+# echo " To install it, just make :"
+# echo " # tar zxvf Net-DNS-0.29.tar.gz"
+# echo " # cd Net-DNS-0.29"
+# echo " # perl Makefile.PL"
+# echo " # make"
+# echo " # make install"
+# exit
+#fi
-echo "Ok"
+#echo "Ok"
+if [ "$1" = "install" ]
+then
install -m 755 -d "$SHAREDIR/smtpscan"
install -m 755 -d "$BINDIR"
install -m 755 -d "$MANDIR"
install -m 444 ./src/fingerprints "$SHAREDIR/smtpscan/fingerprints"
install -m 444 ./src/tests "$SHAREDIR/smtpscan/tests"
+fi
+if [ "$1" = "build" ]
+then
perl -i -pe "s{(\\\$LOCAL_SHARE\s+=\s+)'/usr/local/share';}{\$1'$SHAREDIR';};" ./src/smtpscan
perl -i -pe "s{\\@prefix\\@}{$DESTDIR};" ./docs/man/smtpscan.1
+fi
+if [ "$1" = "install" ]
+then
install -m 755 ./src/smtpscan "$BINDIR/smtpscan"
install -m 644 ./docs/man/smtpscan.1 "$DESTDIR/man/man1"
+fi
-echo "Installation Ok"
+#echo "Installation Ok"

View File

@ -0,0 +1,35 @@
--- src/smtpscan.orig Fri Nov 22 10:23:22 2002
+++ src/smtpscan Fri Nov 22 10:23:09 2002
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
#
# Author : Julien Bordet <zejames@greyhats.org>
# Copyright (C) 2002 Julien Bordet
@@ -9,7 +9,7 @@
#
use strict;
-use Getopt::Long qw /:config no_ignore_case/;
+use Getopt::Long;
use IO::Socket::INET;
use File::Basename;
use Net::DNS;
@@ -28,7 +28,7 @@
# Global variables
#
-$VERSION = '0.3';
+$VERSION = '0.3.1';
$LOCAL_SHARE = '/usr/local/share';
$INVALID_SOURCE = 'impossibleaddress@thisdomaindoesnotandmustnotexists.com';
@@ -34,6 +34,8 @@
$INVALID_SOURCE = 'impossibleaddress@thisdomaindoesnotandmustnotexists.com';
$MY_DOMAIN = 'test.com';
$VALID_SOURCE = 'test@yahoo.com';
+
+Getopt::Long::Configure("no_ignore_case");
$| = 1;
#

View File

@ -0,0 +1,8 @@
smtpscan is a remote SMTP server version detector. It can
be used to guess which mail software is used on a remote
server, that may hide its SMTP banner.
WWW: http://www.greyhats.org/outils/smtpscan/
- Hubert Tournier
hubert@frbsd.org

View File

@ -0,0 +1,4 @@
bin/smtpscan
share/smtpscan/fingerprints
share/smtpscan/tests
@dirrm share/smtpscan