mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
This tool takes files and calculates the final 'eEmule' hashes for
then. It also spits out the complete ed2k:// link in the end. Note: This hashes differ from 'eDonkey/mldonkey' hashes when the size of a files is a mutiple of 9728000 Bytes. WWW: http://www.sdalu.com/software/tools.shtml
This commit is contained in:
parent
863d90c2c9
commit
642b2b3f10
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148845
9 changed files with 233 additions and 0 deletions
|
@ -71,6 +71,7 @@
|
||||||
SUBDIR += dvorak7min
|
SUBDIR += dvorak7min
|
||||||
SUBDIR += dvorakng
|
SUBDIR += dvorakng
|
||||||
SUBDIR += earthview
|
SUBDIR += earthview
|
||||||
|
SUBDIR += ed2k
|
||||||
SUBDIR += edonkey-tool-hash
|
SUBDIR += edonkey-tool-hash
|
||||||
SUBDIR += elscreen
|
SUBDIR += elscreen
|
||||||
SUBDIR += esniper
|
SUBDIR += esniper
|
||||||
|
|
41
misc/ed2k/Makefile
Normal file
41
misc/ed2k/Makefile
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# New ports collection makefile for: ed2k hash tool
|
||||||
|
# Date created: Mi 9 Nov 2005 06:52:38 CET
|
||||||
|
# Whom: dirk.meyer@dinoex.sub.org
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
|
||||||
|
PORTNAME= ed2k
|
||||||
|
PORTVERSION= 1.4
|
||||||
|
CATEGORIES= misc
|
||||||
|
MASTER_SITES= http://www.sdalu.com/download/software/tools/
|
||||||
|
PKGNAMESUFFIX= -hash${PKGNAMESUFFIX2}
|
||||||
|
DISTNAME= ed2k.c
|
||||||
|
EXTRACT_SUFX=
|
||||||
|
EXTRACT_ONLY=
|
||||||
|
|
||||||
|
MAINTAINER= dinoex@FreeBSD.org
|
||||||
|
COMMENT= Calculates 'eMule' hashes or producing ed2k:// file links
|
||||||
|
|
||||||
|
WRKSRC= ${WRKDIR}
|
||||||
|
MAKEFILE= /dev/null
|
||||||
|
ALL_TARGET= ed2k
|
||||||
|
PLIST_FILES= bin/ed2k
|
||||||
|
|
||||||
|
.if defined(WITHOUT_OPENSSL)
|
||||||
|
CPPFLAGS+= -DWITH_RSA
|
||||||
|
MAKE_ENV+= LDLIBS="${CPPFLAGS}"
|
||||||
|
.else
|
||||||
|
USE_OPENSSL= yes
|
||||||
|
OPENSSLSUFFIX= -openssl
|
||||||
|
LDLIBS+= -lmd
|
||||||
|
MAKE_ENV+= LDLIBS="${LDLIBS}"
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-extract:
|
||||||
|
${CP} -p ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} ${WRKSRC}/
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
@${INSTALL_PROGRAM} ${WRKSRC}/ed2k ${PREFIX}/bin/
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
3
misc/ed2k/distinfo
Normal file
3
misc/ed2k/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
MD5 (ed2k.c) = 3e6e3dac4f3d4c068bb6995ec9815ba4
|
||||||
|
SHA256 (ed2k.c) = 08f3f81278bd6cf6d5fdf04d2ea796255a8d73808f4ddd12fd18f6142eb39bb2
|
||||||
|
SIZE (ed2k.c) = 9422
|
65
misc/ed2k/files/patch-ed2k.c
Normal file
65
misc/ed2k/files/patch-ed2k.c
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
--- ed2k.c.orig Sun Jun 13 19:47:20 2004
|
||||||
|
+++ ed2k.c Wed Nov 9 07:55:38 2005
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
/* #define OFF_CONV "%ld" /* off_t is long (Linux) */
|
||||||
|
-/* #define OFF_CONF "%lld" /* off_t is long long (FreeBSD) */
|
||||||
|
+#define OFF_CONV "%lld" /* off_t is long long (FreeBSD) */
|
||||||
|
|
||||||
|
#ifndef OFF_CONV
|
||||||
|
# warning "You should define OFF_CONV (see the file)"
|
||||||
|
@@ -47,16 +47,27 @@
|
||||||
|
|
||||||
|
typedef unsigned char md4_t[16];
|
||||||
|
|
||||||
|
+#if defined(WITH_RSA)
|
||||||
|
+
|
||||||
|
typedef struct {
|
||||||
|
- u_int32_t state[4];
|
||||||
|
- u_int32_t count[2];
|
||||||
|
- unsigned char buffer[64];
|
||||||
|
+ u_int32_t state[4];
|
||||||
|
+ u_int32_t count[2];
|
||||||
|
+ unsigned char buffer[64];
|
||||||
|
} md4_ctx_t;
|
||||||
|
|
||||||
|
void md4_init(md4_ctx_t *);
|
||||||
|
void md4_update(md4_ctx_t *, unsigned char *, unsigned int);
|
||||||
|
void md4_finish(md4_ctx_t *, md4_t);
|
||||||
|
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
+#include <md4.h>
|
||||||
|
+#define md4_ctx_t MD4_CTX
|
||||||
|
+#define md4_init MD4Init
|
||||||
|
+#define md4_update MD4Update
|
||||||
|
+#define md4_finish(a,b) MD4Final(b,a)
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static char *progname;
|
||||||
|
|
||||||
|
@@ -86,7 +97,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-static __inline__ char hdigit(q) {
|
||||||
|
+static __inline__ char hdigit(unsigned char q) {
|
||||||
|
return ((q >= 10) ? 'W' : '0') + q;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -181,6 +192,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+#if defined(WITH_RSA)
|
||||||
|
|
||||||
|
/*==> RSA Data Security, Inc. MD4 Message-Digest Algorithm =============*/
|
||||||
|
|
||||||
|
@@ -323,3 +335,5 @@
|
||||||
|
md4_update (context, bits, 8);
|
||||||
|
md4_encode (digest, context->state, 16);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#endif
|
7
misc/ed2k/pkg-descr
Normal file
7
misc/ed2k/pkg-descr
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
This tool takes files and calculates the final 'eEmule' hashes for
|
||||||
|
then. It also spits out the complete ed2k:// link in the end.
|
||||||
|
|
||||||
|
Note: This hashes differ from 'eDonkey/mldonkey' hashes
|
||||||
|
when the size of a files is a mutiple of 9728000 Bytes.
|
||||||
|
|
||||||
|
WWW: http://www.sdalu.com/software/tools.shtml
|
41
net-p2p/ed2k/Makefile
Normal file
41
net-p2p/ed2k/Makefile
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# New ports collection makefile for: ed2k hash tool
|
||||||
|
# Date created: Mi 9 Nov 2005 06:52:38 CET
|
||||||
|
# Whom: dirk.meyer@dinoex.sub.org
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
|
||||||
|
PORTNAME= ed2k
|
||||||
|
PORTVERSION= 1.4
|
||||||
|
CATEGORIES= misc
|
||||||
|
MASTER_SITES= http://www.sdalu.com/download/software/tools/
|
||||||
|
PKGNAMESUFFIX= -hash${PKGNAMESUFFIX2}
|
||||||
|
DISTNAME= ed2k.c
|
||||||
|
EXTRACT_SUFX=
|
||||||
|
EXTRACT_ONLY=
|
||||||
|
|
||||||
|
MAINTAINER= dinoex@FreeBSD.org
|
||||||
|
COMMENT= Calculates 'eMule' hashes or producing ed2k:// file links
|
||||||
|
|
||||||
|
WRKSRC= ${WRKDIR}
|
||||||
|
MAKEFILE= /dev/null
|
||||||
|
ALL_TARGET= ed2k
|
||||||
|
PLIST_FILES= bin/ed2k
|
||||||
|
|
||||||
|
.if defined(WITHOUT_OPENSSL)
|
||||||
|
CPPFLAGS+= -DWITH_RSA
|
||||||
|
MAKE_ENV+= LDLIBS="${CPPFLAGS}"
|
||||||
|
.else
|
||||||
|
USE_OPENSSL= yes
|
||||||
|
OPENSSLSUFFIX= -openssl
|
||||||
|
LDLIBS+= -lmd
|
||||||
|
MAKE_ENV+= LDLIBS="${LDLIBS}"
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-extract:
|
||||||
|
${CP} -p ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME} ${WRKSRC}/
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
@${INSTALL_PROGRAM} ${WRKSRC}/ed2k ${PREFIX}/bin/
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
3
net-p2p/ed2k/distinfo
Normal file
3
net-p2p/ed2k/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
MD5 (ed2k.c) = 3e6e3dac4f3d4c068bb6995ec9815ba4
|
||||||
|
SHA256 (ed2k.c) = 08f3f81278bd6cf6d5fdf04d2ea796255a8d73808f4ddd12fd18f6142eb39bb2
|
||||||
|
SIZE (ed2k.c) = 9422
|
65
net-p2p/ed2k/files/patch-ed2k.c
Normal file
65
net-p2p/ed2k/files/patch-ed2k.c
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
--- ed2k.c.orig Sun Jun 13 19:47:20 2004
|
||||||
|
+++ ed2k.c Wed Nov 9 07:55:38 2005
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
/* #define OFF_CONV "%ld" /* off_t is long (Linux) */
|
||||||
|
-/* #define OFF_CONF "%lld" /* off_t is long long (FreeBSD) */
|
||||||
|
+#define OFF_CONV "%lld" /* off_t is long long (FreeBSD) */
|
||||||
|
|
||||||
|
#ifndef OFF_CONV
|
||||||
|
# warning "You should define OFF_CONV (see the file)"
|
||||||
|
@@ -47,16 +47,27 @@
|
||||||
|
|
||||||
|
typedef unsigned char md4_t[16];
|
||||||
|
|
||||||
|
+#if defined(WITH_RSA)
|
||||||
|
+
|
||||||
|
typedef struct {
|
||||||
|
- u_int32_t state[4];
|
||||||
|
- u_int32_t count[2];
|
||||||
|
- unsigned char buffer[64];
|
||||||
|
+ u_int32_t state[4];
|
||||||
|
+ u_int32_t count[2];
|
||||||
|
+ unsigned char buffer[64];
|
||||||
|
} md4_ctx_t;
|
||||||
|
|
||||||
|
void md4_init(md4_ctx_t *);
|
||||||
|
void md4_update(md4_ctx_t *, unsigned char *, unsigned int);
|
||||||
|
void md4_finish(md4_ctx_t *, md4_t);
|
||||||
|
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
+#include <md4.h>
|
||||||
|
+#define md4_ctx_t MD4_CTX
|
||||||
|
+#define md4_init MD4Init
|
||||||
|
+#define md4_update MD4Update
|
||||||
|
+#define md4_finish(a,b) MD4Final(b,a)
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
static char *progname;
|
||||||
|
|
||||||
|
@@ -86,7 +97,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-static __inline__ char hdigit(q) {
|
||||||
|
+static __inline__ char hdigit(unsigned char q) {
|
||||||
|
return ((q >= 10) ? 'W' : '0') + q;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -181,6 +192,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+#if defined(WITH_RSA)
|
||||||
|
|
||||||
|
/*==> RSA Data Security, Inc. MD4 Message-Digest Algorithm =============*/
|
||||||
|
|
||||||
|
@@ -323,3 +335,5 @@
|
||||||
|
md4_update (context, bits, 8);
|
||||||
|
md4_encode (digest, context->state, 16);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#endif
|
7
net-p2p/ed2k/pkg-descr
Normal file
7
net-p2p/ed2k/pkg-descr
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
This tool takes files and calculates the final 'eEmule' hashes for
|
||||||
|
then. It also spits out the complete ed2k:// link in the end.
|
||||||
|
|
||||||
|
Note: This hashes differ from 'eDonkey/mldonkey' hashes
|
||||||
|
when the size of a files is a mutiple of 9728000 Bytes.
|
||||||
|
|
||||||
|
WWW: http://www.sdalu.com/software/tools.shtml
|
Loading…
Add table
Reference in a new issue