johntheripper, bump version (#5507)

This commit is contained in:
Schrijvers Luc
2020-12-24 14:25:25 +01:00
committed by GitHub
parent 2878c1f03c
commit 5fbfae0db4
3 changed files with 99 additions and 230 deletions

View File

@@ -9,14 +9,12 @@ COPYRIGHT="1996-2013 Solar Designer
2014 John the Ripper '-jumbo' authors"
LICENSE="GNU GPL v2
John the Ripper"
REVISION="2"
REVISION="1"
jumboVersion="1"
SOURCE_URI="http://www.openwall.com/john/j/john-$portVersion-jumbo-$jumboVersion.tar.xz"
CHECKSUM_SHA256="bac93d025995a051f055adbd7ce2f1975676cac6c74a6c7a3ee4cfdd9c160923"
SOURCE_URI="http://www.openwall.com/john/k/john-$portVersion-jumbo-$jumboVersion.tar.xz"
CHECKSUM_SHA256="f5d123f82983c53d8cc598e174394b074be7a77756f5fb5ed8515918c81e7f3b"
SOURCE_DIR="john-$portVersion-jumbo-$jumboVersion"
# Upstream patches, can be dropped in the next version
PATCHES="johntheripper-$portVersion-upstreamed.patchset
johntheripper-$portVersion.patchset"
PATCHES="johntheripper-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
@@ -33,7 +31,7 @@ PROVIDES="
johntheripper$secondaryArchSuffix = $portVersion
cmd:john = $portVersion
"
bins=(calc_stat cprepair genmkvpwd luks2john mkvcalcproba raw2dyna
bins=(calc_stat cprepair genmkvpwd mkvcalcproba raw2dyna
tgtsnarf uaf2john wpapcap2john)
syms=(base64conv dmg2john gpg2john hccap2john keepass2john keychain2john
keyring2john keystore2john kwallet2john pfx2john putty2john pwsafe2john
@@ -68,9 +66,8 @@ BUILD_PREREQUIRES="
cmd:sed
"
# Instruction sets for fallback chain
instr=(ssse3 sse4.1 avx xop)
# Instruction sets for fallback chain (AVX|XOP are not supported it seems)
instr=(ssse3 sse4.1)
# SSE2 is enabled by default for x86_64, but not for x86.
# To check for enabled instruction set, run:
# gcc -dM -E -x c /dev/null | grep -E "(MMX|SSE|AVX|XOP)"
@@ -86,7 +83,7 @@ BUILD()
#define CFG_ALT_NAME "$constantSettingsDir/john/john.ini"
#define CFG_PRIVATE_FULL_NAME "~config/john/john.conf"
#define CFG_PRIVATE_ALT_NAME "~config/john/john.ini"
#define CPU_FALLBACK 1
#define CPU_FALLBACK 0
#define JOHN_SYSTEMWIDE 1
#define JOHN_SYSTEMWIDE_EXEC "$libExecDir/john"
#define JOHN_SYSTEMWIDE_HOME "$dataDir/john"
@@ -117,7 +114,7 @@ INSTALL()
{
install -d -m 755 "$dataDir/bash-completion/completions" \
"$dataDir/zsh/site-functions" \
"$dataDir/john" "$docDir" "$libExecDir/john" "$settingsDir/john" \
"$dataDir/john" "$docDir/extras" "$libExecDir/john" "$settingsDir/john" \
"$prefix/bin"
# configs
@@ -125,15 +122,14 @@ INSTALL()
sed run/john.conf > "$settingsDir/john/john.conf" \
-e "s|\$JOHN/john.local.conf|$constantSettingsDir/john/john.local.conf|g"
install -m 644 run/john.local.conf "$docDir/john.local.conf.example"
install -m 644 run/john.conf "$docDir/john.local.conf.example"
install -t "$dataDir/john" -m 644 run/*.conf
rm "$dataDir/john/"john{,.local}.conf
# docs
install -t "$docDir" -m 644 doc/*
#rm "$dataDir/john/"john{,.local}.conf
# remove stuff that only devs need
rm "$docDir/"{AddressSanitizer-HOWTO.txt,INSTALL*}
rm -rf doc/extras
# docs
install -t "$docDir" -m 644 doc/*
# licenses
rm "$docDir/COPYING" # no need for another GPL v2 copy

View File

@@ -1,119 +0,0 @@
From 10525817cb0192c749ed6a1b98c3bdc627d61765 Mon Sep 17 00:00:00 2001
From: Solar <solar@openwall.com>
Date: Thu, 18 Dec 2014 21:24:01 +0100
Subject: Fix a bug in truecrypt for non-x86 archs. Closes #912.
diff --git a/src/truecrypt_fmt_plug.c b/src/truecrypt_fmt_plug.c
index 1c95c39..8cef85e 100644
--- a/src/truecrypt_fmt_plug.c
+++ b/src/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);
--
2.15.0
From ef31fea6ee020e40857c52ab5310003b6fc7844f Mon Sep 17 00:00:00 2001
From: magnum <john.magnum@hushmail.com>
Date: Wed, 13 May 2015 12:05:00 +0200
Subject: Add another solution to #1093. This make it possible to build using
gcc 5 without --std=gnu89 (although I kept the latter for now). See also
#1250.
diff --git a/src/DES_bs_b.c b/src/DES_bs_b.c
index e97c4de..0a48ff2 100644
--- a/src/DES_bs_b.c
+++ b/src/DES_bs_b.c
@@ -1247,6 +1247,9 @@ static MAYBE_INLINE void DES_bs_finalize_keys(void)
#endif
#if DES_bs_mt
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE void DES_bs_set_salt_for_thread(int t, unsigned int salt)
#else
void DES_bs_set_salt(ARCH_WORD salt)
diff --git a/src/MD5_std.c b/src/MD5_std.c
index 40bf79e..842eb38 100644
--- a/src/MD5_std.c
+++ b/src/MD5_std.c
@@ -490,9 +490,15 @@ extern void MD5_body(MD5_word x[15], MD5_word out[4]);
#if MD5_std_mt
#define MD5_body(x, out) \
MD5_body_for_thread(t, x, out)
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
MD5_word x[15], MD5_word out[4])
#else
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
#endif
{
@@ -589,10 +595,16 @@ MAYBE_INLINE_BODY void MD5_body(MD5_word x[15], MD5_word out[4])
#if MD5_std_mt
#define MD5_body(x0, x1, out0, out1) \
MD5_body_for_thread(t, x0, x1, out0, out1)
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body_for_thread(int t,
MD5_word x0[15], MD5_word x1[15],
MD5_word out0[4], MD5_word out1[4])
#else
+#if __GNUC__ >= 5
+extern
+#endif
MAYBE_INLINE_BODY void MD5_body(MD5_word x0[15], MD5_word x1[15],
MD5_word out0[4], MD5_word out1[4])
#endif
--
2.15.0
From db958159908e72908c5d366883ca19159eae7bb7 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Sat, 23 Dec 2017 11:25:01 +0700
Subject: idle: add Haiku support
diff --git a/src/idle.c b/src/idle.c
index 1515833..225dfae 100644
--- a/src/idle.c
+++ b/src/idle.c
@@ -35,7 +35,7 @@ static int use_yield = 0;
extern int nice(int);
#endif
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
#include <OS.h>
#endif
@@ -78,7 +78,7 @@ void idle_init(struct fmt_main *format)
#if defined(__MINGW32__) || defined (_MSC_VER)
SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE);
-#elif defined(__BEOS__)
+#elif defined(__BEOS__) || defined(__HAIKU__)
set_thread_priority(getpid(), 1);
#else
/*
--
2.15.0

View File

@@ -1,19 +1,50 @@
From e70ffaaaa9542949d6a371b9755914d1a093b28b Mon Sep 17 00:00:00 2001
From 58fbb6cc44d44ea7fdc268d7f3f91747c69d0a6c Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Sun, 24 Dec 2017 19:41:43 +0700
Subject: path: add expansion for "~config" and "~data"
Subject: Import partial patch from 1.8.0 by Leorize
This commit enable the ability to dynamically expand user configuration
folder and user data folder for Haiku.
This could also be further extended to support XDG Base Directory
Specification.
diff --git a/src/params.h b/src/params.h
index b6d7cd1..d46eef5 100644
--- a/src/params.h
+++ b/src/params.h
@@ -111,8 +111,10 @@
#ifndef JOHN_SYSTEMWIDE_HOME
#define JOHN_SYSTEMWIDE_HOME "/usr/share/john"
#endif
+#ifndef JOHN_PRIVATE_HOME
#define JOHN_PRIVATE_HOME "~/.john"
#endif
+#endif
#ifndef OMP_FALLBACK
#define OMP_FALLBACK 0
@@ -162,16 +164,20 @@
* File names.
*/
#ifdef __DJGPP__
+#ifndef CFG_FULL_NAME
#define CFG_FULL_NAME "$JOHN/john.ini"
#else
#define CFG_FULL_NAME "$JOHN/john.conf"
#endif
+#endif
#if JOHN_SYSTEMWIDE
#ifdef __DJGPP__
+#ifndef CFG_PRIVATE_FULL_NAME
#define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.ini"
#else
#define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.conf"
#endif
+#endif
#define POT_NAME JOHN_PRIVATE_HOME "/john.pot"
#define SEC_POT_NAME JOHN_PRIVATE_HOME "/secure.pot"
#define LOG_NAME JOHN_PRIVATE_HOME "/john.log"
diff --git a/src/path.c b/src/path.c
index 14f6310..444ecb8 100644
index 06714e5..7ebf010 100644
--- a/src/path.c
+++ b/src/path.c
@@ -31,9 +31,16 @@ static int john_home_lengthex;
@@ -30,9 +30,16 @@ static int john_home_length;
#include <pwd.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -29,9 +60,9 @@ index 14f6310..444ecb8 100644
+static int user_data_length;
#endif
#include "memdbg.h"
@@ -66,6 +73,26 @@ void path_init(char **argv)
memcpy(user_home_path, pw->pw_dir, user_home_length - 1);
@@ -72,6 +79,26 @@ void path_init(char **argv)
memcpy(user_home_path, home_dir, user_home_length - 1);
user_home_path[user_home_length - 1] = '/';
+ if (user_config_path) return;
@@ -57,7 +88,7 @@ index 14f6310..444ecb8 100644
#ifdef JOHN_PRIVATE_HOME
private = path_expand(JOHN_PRIVATE_HOME);
if (mkdir(private, S_IRUSR | S_IWUSR | S_IXUSR)) {
@@ -166,6 +193,24 @@ char *path_expand(char *name)
@@ -131,6 +158,24 @@ const char *path_expand(const char *name)
}
return name + 2;
}
@@ -82,17 +113,16 @@ index 14f6310..444ecb8 100644
#endif
return name;
@@ -200,6 +245,8 @@ void path_done(void)
@@ -200,5 +245,7 @@ void path_done(void)
MEM_FREE(john_home_path);
#if JOHN_SYSTEMWIDE
MEM_FREE(user_home_path);
+ MEM_FREE(user_config_path);
+ MEM_FREE(user_data_path);
#endif
if (john_home_pathex)
MEM_FREE(john_home_pathex);
}
diff --git a/src/path.h b/src/path.h
index eeb4b04..9b64e80 100644
index c5393d7..0c13241 100644
--- a/src/path.h
+++ b/src/path.h
@@ -21,7 +21,7 @@
@@ -103,96 +133,58 @@ index eeb4b04..9b64e80 100644
+ * Expands "$JOHN/", "~/", "~config/" and "~data/" in a path name.
* The returned buffer might be overwritten with subsequent calls.
*/
extern char *path_expand(char *name);
--
2.15.0
From a531b588f256bb4a4f559ffc23e861ca31b9e556 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Sun, 24 Dec 2017 20:17:07 +0700
Subject: params: allow changing various paths
diff --git a/src/params.h b/src/params.h
index 29e6509..bd1ee50 100644
--- a/src/params.h
+++ b/src/params.h
@@ -90,8 +90,10 @@
#ifndef JOHN_SYSTEMWIDE_HOME
#define JOHN_SYSTEMWIDE_HOME "/usr/share/john"
#endif
+#ifndef JOHN_PRIVATE_HOME
#define JOHN_PRIVATE_HOME "~/.john"
#endif
+#endif
#ifndef OMP_FALLBACK
#define OMP_FALLBACK 0
@@ -140,11 +142,19 @@
/*
* File names.
*/
+#ifndef CFG_FULL_NAME
#define CFG_FULL_NAME "$JOHN/john.conf"
+#endif
+#ifndef CFG_ALT_NAME
#define CFG_ALT_NAME "$JOHN/john.ini"
+#endif
#if JOHN_SYSTEMWIDE
+#ifndef CFG_PRIVATE_FULL_NAME
#define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.conf"
+#endif
+#ifndef CFG_PRIVATE_ALT_NAME
#define CFG_PRIVATE_ALT_NAME JOHN_PRIVATE_HOME "/john.ini"
+#endif
#define POT_NAME JOHN_PRIVATE_HOME "/john.pot"
#define SEC_POT_NAME JOHN_PRIVATE_HOME "/secure.pot"
#define LOG_NAME JOHN_PRIVATE_HOME "/john.log"
--
2.15.0
From 58dc5c82ea65bc7ca176b52c2729560bb6be90b6 Mon Sep 17 00:00:00 2001
From: Leorize <alaviss@users.noreply.github.com>
Date: Wed, 27 Dec 2017 12:00:07 +0700
Subject: x86-64: disable SIMD code path for NT fmt on Haiku
extern const char *path_expand(const char *name);
diff --git a/src/x86-64.S b/src/x86-64.S
index 80cce05..9905794 100644
index 9b8e369..915d9a2 100644
--- a/src/x86-64.S
+++ b/src/x86-64.S
@@ -1672,6 +1672,7 @@ CPU_detect_fail:
@@ -1750,6 +1750,6 @@ CPU_detect_fail:
ret
#endif
+#ifdef NT_X86_64
/* The following was written by Alain Espinosa <alainesp at gmail.com> in 2007.
* No copyright is claimed, and the software is hereby placed in the public domain.
* In case this attempt to disclaim copyright and place the software in the
@@ -2029,6 +2030,7 @@ nt_crypt_all_8859_1_x86_64:
xchgq %r8,%rax
EPILOGUE
ret
+#endif
#if defined(__ELF__) && defined(__linux__)
-#if defined(__ELF__) && defined(__linux__)
+#if defined(__ELF__) && defined(__linux__) && defined(__HAIKU__)
.section .note.GNU-stack,"",@progbits
#endif
diff --git a/src/x86-64.h b/src/x86-64.h
index 12dc07a..6696ac0 100644
index f77c44a..d13b126 100644
--- a/src/x86-64.h
+++ b/src/x86-64.h
@@ -314,7 +314,9 @@
#define MMX_TYPE " SSE2"
#define MMX_COEF 4
@@ -317,7 +317,9 @@
#define SHA512_N_STR PARA_TO_N(SIMD_COEF_64)
#endif
+#ifndef __HAIKU__
#define NT_X86_64
+#endif
#define MMX_COEF_SHA256 4
#define MMX_COEF_SHA512 2
#endif /* !defined(JOHN_NO_SIMD) */
--
2.15.0
2.28.0
From f1c24e8655cad397aa70e6f376825d44215828b5 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 28 Nov 2020 13:34:46 +0000
Subject: BYTE_ORDER is defined in endian.h
diff --git a/src/int-util.h b/src/int-util.h
index ae32613..cf82552 100644
--- a/src/int-util.h
+++ b/src/int-util.h
@@ -13,6 +13,10 @@
#include <sys/param.h>
#endif
+#if defined(__HAIKU__)
+#include <endian.h>
+#endif
+
#if defined(_MSC_VER)
#include <stdlib.h>
// VC has no sys/parm.h These defines were taken from defines found on cygwin
--
2.28.0