summaryrefslogtreecommitdiff
path: root/security/john
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2016-11-12 15:16:56 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2016-11-12 15:16:56 +0000
commit409c6f1b3ef1acdf1e8b1597bd1ec7f1a46f7af6 (patch)
tree9b88c6e144123fb8b479f2f915428b86a6bf4eda /security/john
parentUpdate to 1.7.1 (diff)
- Update `security/john' to 1.8.0-jumbo-1 (long overdue)
- Remove no longer needed build-related logic since they moved to GNU autotools' based build - Disable OPENMP option for the moment; it will be reintroduced with others (e.g. OpenCL) in a separate commit - Add upstream patch to fix the build on non-x86 architectures [2] - Do not define _POSIX_SOURCE when compiling wordlist.c: this results in broken JtR binary at least on i386 - Define JOHN_SYSTEMWIDE_EXEC for the future when we start to provide fall-back binaries - Stop moving john.conf to /etc. We're not doing it for other *.conf files anyway (the include files); JtR is smart enough to locate its configuration files properly when built in system-wide mode [1] - Install full set of documentation files included with -jumbo - Remove `xtract' symlink which hasn't been part of JtR for more than a decade; install more useful symlinks (unafs, unique, other un* and *2john) that were added in -jumbo instead - Previously *.pl, *.rb, and *.py scripts were installed into DATADIR; Alexander wanted to see them along with the documentation, but that goes a bit too far; put them in ${DATADIR}/extra for the time being PR: 197172 [1] Obtained from: http://www.openwall.com/lists/john-dev/2014/12/18/21 [2]
Notes
Notes: svn path=/head/; revision=425958
Diffstat (limited to 'security/john')
-rw-r--r--security/john/Makefile112
-rw-r--r--security/john/distinfo5
-rw-r--r--security/john/files/patch-rawSHA0__fmt__plug.c18
-rw-r--r--security/john/files/patch-src_john.c22
-rw-r--r--security/john/files/patch-src_params.h14
-rw-r--r--security/john/files/patch-src_rawSHA0__fmt.c17
-rw-r--r--security/john/files/patch-truecrypt__fmt__plug.c13
-rw-r--r--security/john/files/patch-wordlist.c14
-rw-r--r--security/john/pkg-plist129
9 files changed, 198 insertions, 146 deletions
diff --git a/security/john/Makefile b/security/john/Makefile
index 2e8047638e61..1131200d3d30 100644
--- a/security/john/Makefile
+++ b/security/john/Makefile
@@ -2,10 +2,9 @@
# $FreeBSD$
PORTNAME= john
-DISTVERSION= 1.7.9-jumbo-7
-PORTREVISION= 2
+DISTVERSION= 1.8.0-jumbo-1
CATEGORIES= security
-MASTER_SITES= http://www.openwall.com/john/g/ \
+MASTER_SITES= http://www.openwall.com/john/j/ \
http://mirrors.kernel.org/openwall/projects/john/${DISTVERSION:C/-.*//}/ \
http://distro.ibiblio.org/pub/linux/distributions/openwall/projects/john/${DISTVERSION:C/-.*//}/ \
http://gd.tuwien.ac.at/opsys/linux/openwall/projects/john/${DISTVERSION:C/-.*//}/
@@ -15,12 +14,22 @@ COMMENT= Featureful Unix password cracker
LICENSE= GPLv2
+LIB_DEPENDS= libgmp.so:math/gmp
+
BROKEN_aarch64= Fails to build: Cannot detect CPU architechture
BROKEN_mips64= Fails to build: Cannot detect CPU architechture
-USES= gmake shebangfix ssl tar:bzip2
-SHEBANG_FILES= run/*.pl
-BUILD_WRKSRC= ${WRKDIR}/${DISTNAME}/src
+USES= gmake shebangfix ssl tar:xz
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= OPENSSL_CFLAGS="-I${OPENSSLINC}" \
+ OPENSSL_LIBS="-L${OPENSSLLIB} -lcrypto -lssl"
+SHEBANG_FILES= ../run/*.pl ../run/*.rb ../run/benchmark-unify ../run/relbench
+WRKSRC_SUBDIR= src
+
+ALL_TARGET= default
+CFLAGS+= -DJOHN_SYSTEMWIDE=1 \
+ -DJOHN_SYSTEMWIDE_HOME=\\\"${DATADIR}\\\" \
+ -DJOHN_SYSTEMWIDE_EXEC=\\\"${LOCALBASE}/libexec/${PORTNAME}\\\"
# We prefer -jumbo (community-enhanced) versions instead of vanilla releases
# due to the sad fact that `-jumbo-???' suffixed versions *precede* official
@@ -30,75 +39,36 @@ BUILD_WRKSRC= ${WRKDIR}/${DISTNAME}/src
#
PORTSCOUT= limit:.*-jumbo
-OSNAME= freebsd
-CFLAGS+= -DJOHN_SYSTEMWIDE=1 \
- -DJOHN_SYSTEMWIDE_HOME=\\"${DATADIR}\\" \
- -DCFG_FULL_NAME=\\"${PREFIX}/etc/${PORTNAME}.conf\\"
-
-PORTDOCS= CHANGES CONFIG EXAMPLES EXTERNAL FAQ MODES OPTIONS README \
- RULES CONTACT CREDITS
-
-OPTIONS_DEFINE= OPENMP DOCS
-OPENMP_DESC= Compile with OpenMP support
-OPENMP_USES= compiler:openmp
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "i386"
-. if ${MACHINE_CPU:Msse2}
-ALL_TARGET= ${OSNAME}-x86-sse2
-. elif ${MACHINE_CPU:Mmmx}
-ALL_TARGET= ${OSNAME}-x86-mmx
-. else
-ALL_TARGET= ${OSNAME}-x86-any
-. endif
-.elif ${ARCH} == "amd64"
-ALL_TARGET= ${OSNAME}-x86-64
-.else
-ALL_TARGET= generic
-.endif
+BINARIES= calc_stat cprepair genmkvpwd john luks2john mkvcalcproba \
+ raw2dyna SIPdump tgtsnarf uaf2john vncpcap2john wpapcap2john
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
-CFLAGS+= -flax-vector-conversions
-.endif
+BINLINKS= base64conv dmg2john gpg2john hccap2john keepass2john \
+ keychain2john keyring2john keystore2john kwallet2john \
+ pfx2john putty2john pwsafe2john racf2john rar2john ssh2john \
+ truecrypt_volume2john unafs undrop unique unshadow zip2john
-post-patch:
- @${REINPLACE_CMD} -e 's|= gcc|= ${CC}|' \
- -e '/^CFLAGS =/s|-O2|${CFLAGS}|' ${WRKSRC}/src/Makefile
-.if ${PORT_OPTIONS:MOPENMP}
- @${REINPLACE_CMD} -E \
- '/(fopenmp|-m${MACHINE_CPU:Msse2})$$/s,#(OMPFLAGS =),\1,' \
- ${WRKSRC}/src/Makefile
-.endif
- @${REINPLACE_CMD} -i '' -e 's|/usr/bin|${LOCALBASE}/bin|' \
- ${WRKSRC}/run/*.rb
- @${REINPLACE_CMD} -e '/_XOPEN_SOURCE/d' ${WRKSRC}/src/recovery.c
-# Replace methods and types that were marked deprecated by OpenSSL 0.9.7
-# and will be removed in OpenSSL 1.1.0
- @${REINPLACE_CMD} -e 's|des_string_to_key|DES_string_to_key|' \
- ${WRKSRC}/src/KRB4_fmt_plug.c
- @${REINPLACE_CMD} -e 's|des_set_odd_parity|DES_set_odd_parity|' \
- ${WRKSRC}/src/KRB4_std_plug.c
- @${REINPLACE_CMD} -e 's|C_Block|DES_cblock|' \
- ${WRKSRC}/src/keychain_fmt_plug.c
+PORTDOCS= *
-pre-build:
- @${ECHO_CMD}
- @${ECHO_CMD} "Building John the Ripper for ${ALL_TARGET}" \
- ${WITH_OPENMP:C/.*/with/}${WITHOUT_OPENMP:C/.*/without/} \
- "OpenMP support"
- @${ECHO_CMD}
+OPTIONS_DEFINE= DOCS #OPENMP
+#OPENMP_USES= compiler:openmp
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/run/john ${STAGEDIR}${PREFIX}/bin
- ${LN} -sf john ${STAGEDIR}${PREFIX}/bin/xtract
- ${LN} -sf john ${STAGEDIR}${PREFIX}/bin/unshadow
- @${MKDIR} ${STAGEDIR}${DATADIR}
- cd ${WRKSRC}/run && ${INSTALL_DATA} *.??? [^j]*.conf ${STAGEDIR}${DATADIR}
- cd ${WRKSRC}/run && ${INSTALL_SCRIPT} *.?? mailer ${STAGEDIR}${DATADIR}
- ${INSTALL_DATA} ${WRKSRC}/run/john.conf \
- ${STAGEDIR}${PREFIX}/etc/john.conf.default
+.for b in ${BINARIES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/../run/${b} ${STAGEDIR}${PREFIX}/bin
+.endfor
+.for l in ${BINLINKS}
+ ${LN} -sf john ${STAGEDIR}${PREFIX}/bin/${l}
+.endfor
+ @${MKDIR} ${STAGEDIR}${DATADIR}/extra
+ cd ${WRKSRC}/../run && ${INSTALL_DATA} *.chr *.conf *.lst \
+ ${STAGEDIR}${DATADIR}
+ cd ${WRKSRC}/../run && ${INSTALL_DATA} *.?? benchmark-unify \
+ dictionary.rfc2865 john.*sh_completion mailer makechr \
+ relbench stats ${STAGEDIR}${DATADIR}/extra
+
+do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
+ @${RM} ${WRKSRC}/../doc/COPYING
+ ${INSTALL_DATA} ${WRKSRC}/../doc/* ${STAGEDIR}${DOCSDIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/security/john/distinfo b/security/john/distinfo
index 23014c83b89d..77b6f3fa322d 100644
--- a/security/john/distinfo
+++ b/security/john/distinfo
@@ -1,2 +1,3 @@
-SHA256 (john-1.7.9-jumbo-7.tar.bz2) = fa7e5a1a31e61d516a97318fac27758ca40b1a626f4dbf353ecece8a41f54d32
-SIZE (john-1.7.9-jumbo-7.tar.bz2) = 1595514
+TIMESTAMP = 1418916028
+SHA256 (john-1.8.0-jumbo-1.tar.xz) = bac93d025995a051f055adbd7ce2f1975676cac6c74a6c7a3ee4cfdd9c160923
+SIZE (john-1.8.0-jumbo-1.tar.xz) = 23232492
diff --git a/security/john/files/patch-rawSHA0__fmt__plug.c b/security/john/files/patch-rawSHA0__fmt__plug.c
new file mode 100644
index 000000000000..b183e8fa2a75
--- /dev/null
+++ b/security/john/files/patch-rawSHA0__fmt__plug.c
@@ -0,0 +1,18 @@
+--- rawSHA0_fmt_plug.c.orig 2014-09-19 16:40:51 UTC
++++ rawSHA0_fmt_plug.c
+@@ -15,6 +15,8 @@ john_register_one(&fmt_rawSHA_0);
+ #include <string.h>
+ #include <openssl/sha.h>
+
++#ifndef OPENSSL_NO_SHA0
++
+ #include "arch.h"
+ #include "misc.h"
+ #include "common.h"
+@@ -207,4 +209,6 @@ struct fmt_main fmt_rawSHA_0 = {
+ }
+ };
+
++#endif /* OPENSSL_NO_SHA0 */
++
+ #endif /* plugin stanza */
diff --git a/security/john/files/patch-src_john.c b/security/john/files/patch-src_john.c
deleted file mode 100644
index 9227093af893..000000000000
--- a/security/john/files/patch-src_john.c
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/john.c.orig 2012-09-20 01:50:17 UTC
-+++ src/john.c
-@@ -183,7 +183,9 @@ extern struct fmt_main fmt_wpapsk;
-
- extern struct fmt_main fmt_hmacMD5;
- extern struct fmt_main fmt_hmacSHA1;
-+#ifndef OPENSSL_NO_SHA0
- extern struct fmt_main fmt_rawSHA0;
-+#endif
-
- extern int unique(int argc, char **argv);
- extern int unshadow(int argc, char **argv);
-@@ -241,7 +243,9 @@ static void john_register_all(void)
-
- john_register_one(&fmt_hmacMD5);
- john_register_one(&fmt_hmacSHA1);
-+#ifndef OPENSSL_NO_SHA0
- john_register_one(&fmt_rawSHA0);
-+#endif
-
- #if OPENSSL_VERSION_NUMBER >= 0x00908000
- john_register_one(&fmt_rawSHA224);
diff --git a/security/john/files/patch-src_params.h b/security/john/files/patch-src_params.h
deleted file mode 100644
index fa6b9d082415..000000000000
--- a/security/john/files/patch-src_params.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/params.h.orig 2012-09-20 14:35:00 UTC
-+++ src/params.h
-@@ -134,7 +134,11 @@
- /*
- * File names.
- */
-+#if JOHN_SYSTEMWIDE
-+#ifndef CFG_FULL_NAME
- #define CFG_FULL_NAME "$JOHN/john.conf"
-+#endif
-+#endif
- #define CFG_ALT_NAME "$JOHN/john.ini"
- #if JOHN_SYSTEMWIDE
- #define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.conf"
diff --git a/security/john/files/patch-src_rawSHA0__fmt.c b/security/john/files/patch-src_rawSHA0__fmt.c
deleted file mode 100644
index c9325bc663e9..000000000000
--- a/security/john/files/patch-src_rawSHA0__fmt.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/rawSHA0_fmt.c.orig 2012-09-17 08:30:39 UTC
-+++ src/rawSHA0_fmt.c
-@@ -9,6 +9,8 @@
- #include <string.h>
- #include "sha.h"
-
-+#ifndef OPENSSL_NO_SHA0
-+
- #include "arch.h"
- #include "misc.h"
- #include "common.h"
-@@ -189,3 +191,5 @@ struct fmt_main fmt_rawSHA0 = {
- cmp_exact
- }
- };
-+
-+#endif
diff --git a/security/john/files/patch-truecrypt__fmt__plug.c b/security/john/files/patch-truecrypt__fmt__plug.c
new file mode 100644
index 000000000000..f96cfb307f73
--- /dev/null
+++ b/security/john/files/patch-truecrypt__fmt__plug.c
@@ -0,0 +1,13 @@
+--- truecrypt_fmt_plug.c.orig 2014-12-18 07:59:02 UTC
++++ truecrypt_fmt_plug.c
+@@ -310,8 +310,8 @@ static int crypt_all(int *pcount, struct
+ pbkdf2_sha512_sse((const unsigned char **)pin, lens, psalt->salt, 64, psalt->num_iterations, &(x.poutc), sizeof(key), 0);
+ }
+ #else
+- if (is_sha512)
+- pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen(key_buffer[i]), psalt->salt, 64, num_iterations, key, sizeof(key), 0);
++ if (psalt->hash_type == IS_SHA512)
++ pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen((char*)key_buffer[i]), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0);
+ #endif
+ else if (psalt->hash_type == IS_RIPEMD160)
+ pbkdf2_ripemd160(key_buffer[i], strlen((char*)(key_buffer[i])), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0);
diff --git a/security/john/files/patch-wordlist.c b/security/john/files/patch-wordlist.c
new file mode 100644
index 000000000000..91cd8efd55a3
--- /dev/null
+++ b/security/john/files/patch-wordlist.c
@@ -0,0 +1,14 @@
+--- wordlist.c.orig 2014-11-11 14:41:25 UTC
++++ wordlist.c
+@@ -10,11 +10,6 @@
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ */
+
+-/* NOTE, _POSIX_SOURCE fuk's up solaris 32 bit 64 bit processing!!! */
+-#ifndef sparc
+-#define _POSIX_SOURCE /* for fileno(3) */
+-#endif
+-
+ #include <stdio.h>
+ #include <sys/stat.h>
+
diff --git a/security/john/pkg-plist b/security/john/pkg-plist
index d7207edcfd59..b6f197cc46ac 100644
--- a/security/john/pkg-plist
+++ b/security/john/pkg-plist
@@ -1,28 +1,117 @@
+bin/SIPdump
+bin/base64conv
+bin/calc_stat
+bin/cprepair
+bin/dmg2john
+bin/genmkvpwd
+bin/gpg2john
+bin/hccap2john
bin/john
+bin/keepass2john
+bin/keychain2john
+bin/keyring2john
+bin/keystore2john
+bin/kwallet2john
+bin/luks2john
+bin/mkvcalcproba
+bin/pfx2john
+bin/putty2john
+bin/pwsafe2john
+bin/racf2john
+bin/rar2john
+bin/raw2dyna
+bin/ssh2john
+bin/tgtsnarf
+bin/truecrypt_volume2john
+bin/uaf2john
+bin/unafs
+bin/undrop
+bin/unique
bin/unshadow
-bin/xtract
-@sample etc/john.conf.default etc/john.conf
-%%DATADIR%%/all.chr
-%%DATADIR%%/alnum.chr
+bin/vncpcap2john
+bin/wpapcap2john
+bin/zip2john
+%%DATADIR%%/extra/1password2john.py
+%%DATADIR%%/extra/7z2john.py
+%%DATADIR%%/extra/aix2john.pl
+%%DATADIR%%/extra/aix2john.py
+%%DATADIR%%/extra/androidfde2john.py
+%%DATADIR%%/extra/apex2john.py
+%%DATADIR%%/extra/benchmark-unify
+%%DATADIR%%/extra/bitcoin2john.py
+%%DATADIR%%/extra/blockchain2john.py
+%%DATADIR%%/extra/cisco2john.pl
+%%DATADIR%%/extra/cracf2john.py
+%%DATADIR%%/extra/dictionary.rfc2865
+%%DATADIR%%/extra/dmg2john.py
+%%DATADIR%%/extra/ecryptfs2john.py
+%%DATADIR%%/extra/efs2john.py
+%%DATADIR%%/extra/encfs2john.py
+%%DATADIR%%/extra/genincstats.rb
+%%DATADIR%%/extra/hextoraw.pl
+%%DATADIR%%/extra/htdigest2john.py
+%%DATADIR%%/extra/ikescan2john.py
+%%DATADIR%%/extra/ios7tojohn.pl
+%%DATADIR%%/extra/john.bash_completion
+%%DATADIR%%/extra/john.zsh_completion
+%%DATADIR%%/extra/kdcdump2john.py
+%%DATADIR%%/extra/keychain2john.py
+%%DATADIR%%/extra/keystore2john.py
+%%DATADIR%%/extra/known_hosts2john.py
+%%DATADIR%%/extra/kwallet2john.py
+%%DATADIR%%/extra/ldif2john.pl
+%%DATADIR%%/extra/leet.pl
+%%DATADIR%%/extra/lion2john-alt.pl
+%%DATADIR%%/extra/lion2john.pl
+%%DATADIR%%/extra/lotus2john.py
+%%DATADIR%%/extra/mailer
+%%DATADIR%%/extra/makechr
+%%DATADIR%%/extra/mcafee_epo2john.py
+%%DATADIR%%/extra/ml2john.py
+%%DATADIR%%/extra/mozilla2john.py
+%%DATADIR%%/extra/netntlm.pl
+%%DATADIR%%/extra/netscreen.py
+%%DATADIR%%/extra/odf2john.py
+%%DATADIR%%/extra/office2john.py
+%%DATADIR%%/extra/openbsd_softraid2john.py
+%%DATADIR%%/extra/openssl2john.py
+%%DATADIR%%/extra/pass_gen.pl
+%%DATADIR%%/extra/pcap2john.py
+%%DATADIR%%/extra/pdf2john.py
+%%DATADIR%%/extra/radius2john.pl
+%%DATADIR%%/extra/relbench
+%%DATADIR%%/extra/rexgen2rules.pl
+%%DATADIR%%/extra/sap2john.pl
+%%DATADIR%%/extra/sha-dump.pl
+%%DATADIR%%/extra/sha-test.pl
+%%DATADIR%%/extra/sipdump2john.py
+%%DATADIR%%/extra/ssh2sshng.py
+%%DATADIR%%/extra/sshng2john.py
+%%DATADIR%%/extra/stats
+%%DATADIR%%/extra/strip2john.py
+%%DATADIR%%/extra/sxc2john.py
%%DATADIR%%/alpha.chr
-%%DATADIR%%/cracf2john.py
+%%DATADIR%%/alnum.chr
+%%DATADIR%%/alnumspace.chr
+%%DATADIR%%/ascii.chr
%%DATADIR%%/digits.chr
+%%DATADIR%%/dynamic.conf
+%%DATADIR%%/dynamic_flat_sse_formats.conf
%%DATADIR%%/dumb16.conf
%%DATADIR%%/dumb32.conf
-%%DATADIR%%/dynamic.conf
-%%DATADIR%%/genincstats.rb
+%%DATADIR%%/john.conf
+%%DATADIR%%/john.local.conf
+%%DATADIR%%/korelogic.conf
%%DATADIR%%/lanman.chr
-%%DATADIR%%/ldif2john.pl
-%%DATADIR%%/lion2john-alt.pl
-%%DATADIR%%/lion2john.pl
-%%DATADIR%%/mailer
-%%DATADIR%%/netntlm.pl
-%%DATADIR%%/netscreen.py
-%%DATADIR%%/odf2john.py
-%%DATADIR%%/pass_gen.pl
+%%DATADIR%%/latin1.chr
+%%DATADIR%%/lm_ascii.chr
+%%DATADIR%%/lower.chr
+%%DATADIR%%/lowernum.chr
+%%DATADIR%%/lowerspace.chr
%%DATADIR%%/password.lst
-%%DATADIR%%/radius2john.pl
-%%DATADIR%%/sap2john.pl
-%%DATADIR%%/sha-dump.pl
-%%DATADIR%%/sha-test.pl
-%%DATADIR%%/sipdump2john.py
+%%DATADIR%%/regex_alphabets.conf
+%%DATADIR%%/repeats16.conf
+%%DATADIR%%/repeats32.conf
+%%DATADIR%%/upper.chr
+%%DATADIR%%/uppernum.chr
+%%DATADIR%%/utf8.chr