- fix MASTER_SITES
- add MASTER_SITE_PACKETSTORM as backup - NO_REGRESS - stylize - rename patch - fix output formating in patch - sprinkle $OpenBSD$ - regen PLIST - take over maintainership (this ok dugsong@)
This commit is contained in:
parent
f7cd1cc669
commit
32a9e13040
@ -1,38 +1,39 @@
|
||||
# Makefile for: ADMsnmp
|
||||
# Version required: 0.1
|
||||
# Date created: 14 Mar 1999
|
||||
# Whom: dugsong@monkey.org
|
||||
#
|
||||
# $OpenBSD: Makefile,v 1.14 2002/03/21 21:25:51 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.15 2002/03/24 07:55:54 jsyn Exp $
|
||||
|
||||
COMMENT= "SNMP audit scanner"
|
||||
COMMENT= "SNMP audit scanner"
|
||||
|
||||
PKGNAME= ADMsnmp-0.1
|
||||
DISTNAME= ADMsnmp.0.1
|
||||
DISTNAME= ADMsnmp.0.1
|
||||
PKGNAME= ADMsnmp-0.1
|
||||
CATEGORIES= security
|
||||
NEED_VERSION= 1.515
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
CATEGORIES= security
|
||||
NEED_VERSION= 1.515
|
||||
MAINTAINER= Jason Peel <jsyn@openbsd.org>
|
||||
|
||||
MASTER_SITES= http://el8.org/~antilove/ \
|
||||
ftp://ADM.isp.at/ADM/ \
|
||||
http://ADM.isp.at/ADM/
|
||||
PERMIT_PACKAGE_CDROM= "no license"
|
||||
PERMIT_PACKAGE_FTP= "no license"
|
||||
PERMIT_DISTFILES_CDROM= "no license"
|
||||
PERMIT_DISTFILES_FTP= "no license"
|
||||
|
||||
MAINTAINER= Dug Song <dugsong@monkey.org>
|
||||
MASTER_SITES= ftp://adm.freelsd.net/pub/ADM/ \
|
||||
http://adm.freelsd.net/ADM/ \
|
||||
${MASTER_SITE_PACKETSTORM}
|
||||
MASTER_SITE_SUBDIR= groups/ADM
|
||||
|
||||
# License: NONE
|
||||
PERMIT_PACKAGE_CDROM= "no license"
|
||||
PERMIT_PACKAGE_FTP= "no license"
|
||||
PERMIT_DISTFILES_CDROM= "no license"
|
||||
PERMIT_DISTFILES_FTP= "no license"
|
||||
WRKDIST= ${WRKDIR}/ADMsnmp
|
||||
|
||||
WRKDIST= ${WRKDIR}/ADMsnmp
|
||||
NO_REGRESS= Yes
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} ; ${CC} ${CFLAGS} -o ADMsnmp snmp.c
|
||||
cd ${WRKSRC} ; ${CC} ${CFLAGS} \
|
||||
-DPORTSHAREDIR="${TRUEPREFIX}/share/ADMsnmp" \
|
||||
-o ADMsnmp snmp.c
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ADMsnmp ${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib/ADMsnmp
|
||||
${INSTALL_DATA} ${WRKSRC}/snmp.passwd ${PREFIX}/lib/ADMsnmp
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ADMsnmp ${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/ADMsnmp
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ADMsnmp
|
||||
${INSTALL_DATA} ${WRKSRC}/snmp.passwd ${PREFIX}/share/ADMsnmp
|
||||
${INSTALL_DATA} ${WRKSRC}/ADMsnmp.README ${PREFIX}/share/doc/ADMsnmp
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,84 +0,0 @@
|
||||
*** snmp.c-orig Wed Feb 17 02:20:05 1999
|
||||
--- snmp.c Sun Mar 14 13:27:11 1999
|
||||
***************
|
||||
*** 33,38 ****
|
||||
--- 33,40 ----
|
||||
#include <sys/stat.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
+ #include <sys/types.h>
|
||||
+ #include <sys/socket.h>
|
||||
|
||||
|
||||
struct snmpchex
|
||||
***************
|
||||
*** 239,246 ****
|
||||
|
||||
return (i + 2);
|
||||
}
|
||||
! else
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
--- 241,249 ----
|
||||
|
||||
return (i + 2);
|
||||
}
|
||||
! else {
|
||||
return (-1);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
***************
|
||||
*** 300,306 ****
|
||||
memset (buf, 0, sizeofbuf);
|
||||
i = getreq (buf, namez, GETREQ_SYSDEC, id, set_req);
|
||||
memcpy ((buf + i), sysdec, GETREQ_SYSDEC);
|
||||
! return (sendto (sock, buf, i + GETREQ_SYSDEC, 0, sin, sizeof (struct sockaddr_in)));
|
||||
}
|
||||
|
||||
/** getreq paket **/
|
||||
--- 303,309 ----
|
||||
memset (buf, 0, sizeofbuf);
|
||||
i = getreq (buf, namez, GETREQ_SYSDEC, id, set_req);
|
||||
memcpy ((buf + i), sysdec, GETREQ_SYSDEC);
|
||||
! return (sendto (sock, buf, i + GETREQ_SYSDEC, 0, (const struct sockaddr *)sin, sizeof (struct sockaddr_in)));
|
||||
}
|
||||
|
||||
/** getreq paket **/
|
||||
***************
|
||||
*** 460,466 ****
|
||||
i = 0;
|
||||
/** we get an answer !!!! */
|
||||
|
||||
! if ((i = recvfrom (sock, (char *) &buf, sizeof (buf), 0, &sin, &x)) > 0)
|
||||
{
|
||||
nd = 0;
|
||||
/** extract the ID the return code and the community name **/
|
||||
--- 463,469 ----
|
||||
i = 0;
|
||||
/** we get an answer !!!! */
|
||||
|
||||
! if ((i = recvfrom (sock, (char *) &buf, sizeof (buf), 0, (struct sockaddr *)&sin, &x)) > 0)
|
||||
{
|
||||
nd = 0;
|
||||
/** extract the ID the return code and the community name **/
|
||||
***************
|
||||
*** 581,587 ****
|
||||
printf ("cant resolve hostname!\n");
|
||||
exit (-1);
|
||||
}
|
||||
! opz.wordfile = strdup ("snmp.passwd");
|
||||
opz.outputfile = NULL;
|
||||
opz.guess = -1;
|
||||
opz.manysend = 2;
|
||||
--- 584,590 ----
|
||||
printf ("cant resolve hostname!\n");
|
||||
exit (-1);
|
||||
}
|
||||
! opz.wordfile = strdup ("/usr/local/lib/ADMsnmp/snmp.passwd");
|
||||
opz.outputfile = NULL;
|
||||
opz.guess = -1;
|
||||
opz.manysend = 2;
|
73
security/ADMsnmp/patches/patch-snmp_c
Normal file
73
security/ADMsnmp/patches/patch-snmp_c
Normal file
@ -0,0 +1,73 @@
|
||||
$OpenBSD: patch-snmp_c,v 1.1 2002/03/24 07:55:53 jsyn Exp $
|
||||
--- snmp.c.orig Wed Feb 17 01:20:05 1999
|
||||
+++ snmp.c Sun Mar 24 00:12:22 2002
|
||||
@@ -33,6 +33,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
|
||||
|
||||
struct snmpchex
|
||||
@@ -239,8 +241,9 @@
|
||||
|
||||
return (i + 2);
|
||||
}
|
||||
- else
|
||||
+ else {
|
||||
return (-1);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,7 +303,7 @@
|
||||
memset (buf, 0, sizeofbuf);
|
||||
i = getreq (buf, namez, GETREQ_SYSDEC, id, set_req);
|
||||
memcpy ((buf + i), sysdec, GETREQ_SYSDEC);
|
||||
- return (sendto (sock, buf, i + GETREQ_SYSDEC, 0, sin, sizeof (struct sockaddr_in)));
|
||||
+ return (sendto (sock, buf, i + GETREQ_SYSDEC, 0, (const struct sockaddr *)sin, sizeof (struct sockaddr_in)));
|
||||
}
|
||||
|
||||
/** getreq paket **/
|
||||
@@ -460,7 +463,7 @@
|
||||
i = 0;
|
||||
/** we get an answer !!!! */
|
||||
|
||||
- if ((i = recvfrom (sock, (char *) &buf, sizeof (buf), 0, &sin, &x)) > 0)
|
||||
+ if ((i = recvfrom (sock, (char *) &buf, sizeof (buf), 0, (struct sockaddr *)&sin, &x)) > 0)
|
||||
{
|
||||
nd = 0;
|
||||
/** extract the ID the return code and the community name **/
|
||||
@@ -536,15 +539,15 @@
|
||||
usage (char *name)
|
||||
{
|
||||
printf ("ADMsnmp v %s (c) The ADM crew\n", "0.1");
|
||||
- printf ("%s: <host> [-g,-wordf,-out <name>, [-waitf,-sleep, -manysend,-inter <#>] ] \n", name);
|
||||
- printf ("<hostname> : host to scan \n"
|
||||
- "[-guessname] : guess password with hostname \n"
|
||||
+ printf ("%s: <host> [-g,-wordf,-out <name>, [-waitf,-sleep, -manysend,-inter <#>] ]\n", name);
|
||||
+ printf ("<hostname> : host to scan\n"
|
||||
+ "[-guessname] : guess password with hostname\n"
|
||||
"[-wordfile] : wordlist of password to try\n"
|
||||
"[-outputfile] <name>: output file\n"
|
||||
- "[-waitfor] <mili> : time in milisecond in each send of snmprequest\n"
|
||||
- "[-sleep] <second> : time in second of the scan process life\n"
|
||||
- "[-manysend] <number>: how many paket to send by request \n"
|
||||
- "[-inter] <mili> : time to wait in milisecond after each request");
|
||||
+ "[-waitfor] <mili>: time in milisecond in each send of snmprequest\n"
|
||||
+ "[-sleep] <second>: time in second of the scan process life\n"
|
||||
+ "[-manysend] <number>: how many paket to send by request\n"
|
||||
+ "[-inter] <mili>: time to wait in milisecond after each request\n");
|
||||
}
|
||||
|
||||
int
|
||||
@@ -581,7 +584,7 @@
|
||||
printf ("cant resolve hostname!\n");
|
||||
exit (-1);
|
||||
}
|
||||
- opz.wordfile = strdup ("snmp.passwd");
|
||||
+ opz.wordfile = strdup ("PORTSHAREDIR/snmp.passwd");
|
||||
opz.outputfile = NULL;
|
||||
opz.guess = -1;
|
||||
opz.manysend = 2;
|
@ -1,3 +1,6 @@
|
||||
@comment $OpenBSD: PLIST,v 1.3 2002/03/24 07:55:54 jsyn Exp $
|
||||
bin/ADMsnmp
|
||||
lib/ADMsnmp/snmp.passwd
|
||||
@dirrm lib/ADMsnmp
|
||||
share/ADMsnmp/snmp.passwd
|
||||
share/doc/ADMsnmp/ADMsnmp.README
|
||||
@dirrm share/doc/ADMsnmp
|
||||
@dirrm share/ADMsnmp
|
||||
|
Loading…
Reference in New Issue
Block a user