john: update to 1.8.0.

This commit is contained in:
Christian Neukirchen 2015-02-02 16:50:25 +01:00
parent ef1b13ec15
commit 2436af34df
3 changed files with 53 additions and 31 deletions

View File

@ -0,0 +1,9 @@
--- common.h 2015-02-02 15:49:37.819305586 +0100
+++ common.h 2015-02-02 15:47:25.449554007 +0100
@@ -75,4 +75,6 @@
*/
extern void common_init(void);
+#define C_Block DES_cblock
+
#endif

View File

@ -0,0 +1,20 @@
Upstream patch:
commit 480e95b0e449863be3e1a5b0bc634a67df28b618
Author: Solar <solar@openwall.com>
Date: Thu Dec 18 21:24:01 2014 +0100
Fix a bug in truecrypt for non-x86 archs. Closes #912.
--- truecrypt_fmt_plug.c
+++ truecrypt_fmt_plug.c
@@ -310,8 +310,8 @@ static int crypt_all(int *pcount, struct db_salt *salt)
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);

View File

@ -1,38 +1,30 @@
# Template file for 'john'
pkgname=john
version=1.7.9
_jumbover=5
revision=5
wrksrc="${pkgname}-${version}-jumbo-${_jumbover}"
hostmakedepends="libgomp-devel"
makedepends="zlib-devel libgomp-devel libressl-devel>=2.1.3"
version=1.8.0
_jumbover=1
revision=1
wrksrc="${pkgname}-${version}-jumbo-${_jumbover}/src"
build_style=gnu-configure
hostmakedepends="libgomp-devel pkg-config"
makedepends="zlib-devel libgomp-devel libressl-devel>=2.1.3 libpcap-devel gmp-devel"
conf_files="/etc/john/john.conf"
short_desc="John the Ripper password cracker (jumbo-${_jumbover} patch included)"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://www.openwall.com/john/"
distfiles="$homepage/g/$pkgname-${version}-jumbo-${_jumbover}.tar.bz2"
checksum=4007aec40d2fedb1ce3287c62f23f8a1a8b8029d22cd3cbc60bb1a42f56c1a7f
nocross=yes
distfiles="$homepage/j/$pkgname-${version}-jumbo-${_jumbover}.tar.xz"
checksum=bac93d025995a051f055adbd7ce2f1975676cac6c74a6c7a3ee4cfdd9c160923
do_configure() {
sed -i 's|CFLAGS = -c -Wall -O2|CFLAGS += -c -Wall -DJOHN_SYSTEMWIDE=1|' src/Makefile
sed -i 's|^LDFLAGS =\(.*\)|LDFLAGS +=\1 -lm|' src/Makefile
sed -i 's|-m486||g' src/Makefile
sed -i '/OMPFLAGS/s|-msse2||g' src/Makefile
sed -i 's|#OMPFLAGS = -fopenmp|OMPFLAGS = -fopenmp|' src/Makefile
sed -i 's|des_|DES_|g' src/KRB4*.c
}
do_build() {
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
make ${makejobs} -C src linux-x86-64
elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
make ${makejobs} -C src linux-x86-mmx
else
make ${makejobs} -C src generic
fi
pre_configure() {
sed -i 's|des_|DES_|g' KRB4*.c
export AS= LD=
export OPENSSL_LIBS="-lssl -lcrypto"
CFLAGS+=" -DJOHN_SYSTEMWIDE=1"
}
do_install() {
cd ..
# config file
sed -i 's|$JOHN|/usr/share/john|g' run/john.conf
install -Dm644 run/john.conf ${DESTDIR}/etc/john/john.conf
@ -43,19 +35,20 @@ do_install() {
vmkdir usr/share/john
mv ${DESTDIR}/usr/share/doc/$pkgname/LICENSE ${DESTDIR}/usr/share/licenses/$pkgname
# install password list and charset files
install -m644 run/{{all,alnum,alpha,digits,lanman}.chr,password.lst} \
${DESTDIR}/usr/share/john
install -m644 run/{dumb16,dumb32,dynamic}.conf \
${DESTDIR}/usr/share/john
install -m644 run/*.chr run/*.lst ${DESTDIR}/usr/share/john
install -m644 run/*.conf ${DESTDIR}/usr/share/john
# install binaries
install -Dm755 run/john ${DESTDIR}/usr/bin/john
install -Dm755 run/mailer ${DESTDIR}/usr/bin/john-mailer
vbin run/john
vbin run/mailer john-mailer
vbin run/vncpcap2john
vbin run/luks2john
cd ${DESTDIR}/usr/bin
ln -s john unafs
ln -s john unique
ln -s john unshadow
ln -s john undrop
ln -s john gpg2john
ln -s john pdf2john
ln -s john rar2john
ln -s john ssh2john