[Forensics-changes] [bruteforce-salted-openssl] 01/02: Imported Upstream version 1.3.3
Joao Eriberto Mota Filho
eriberto at moszumanska.debian.org
Wed Dec 14 22:49:58 UTC 2016
This is an automated email from the git hooks/post-receive script.
eriberto pushed a commit to branch debian
in repository bruteforce-salted-openssl.
commit 20d86cb81bee852744ce10c83ef2cb620d9dc230
Author: Joao Eriberto Mota Filho <eriberto at debian.org>
Date: Wed Dec 14 20:49:37 2016 -0200
Imported Upstream version 1.3.3
---
ChangeLog | 4 +++
NEWS | 3 +++
configure.ac | 5 ++--
.../bruteforce-salted-openssl-1.3.3.ebuild | 30 ++++++++++++++++++++++
src/bruteforce-salted-openssl.c | 15 +++++++++++
src/version.h | 2 +-
6 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 17c447e..7a45aa7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-11-27 Guillaume LE VAILLANT <guillaume.le.vaillant at openmailbox.org>
+ Version 1.3.3
+ Add bruteforcing speed and last tried password to progress info.
+
2016-09-26 Guillaume LE VAILLANT <guillaume.le.vaillant at openmailbox.org>
Version 1.3.2
Fixes for OpenSSL 1.1.0 API changes.
diff --git a/NEWS b/NEWS
index 1e6c07f..c4f296b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+Version 1.3.3
+ 2016-11-27
+
Version 1.3.2
2016-09-26
diff --git a/configure.ac b/configure.ac
index d27e560..68788f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Process this file with autoconf
-AC_INIT(bruteforce_salted_openssl, 1.3.2)
+AC_INIT(bruteforce_salted_openssl, 1.3.3)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/bruteforce-salted-openssl.c)
@@ -8,7 +8,7 @@ AC_PROG_CC
AC_PROG_INSTALL
dnl Check for standard headers
-AC_CHECK_HEADERS([ctype.h fcntl.h locale.h math.h stdio.h stdlib.h string.h sys/stat.h sys/types.h unistd.h wchar.h])
+AC_CHECK_HEADERS([ctype.h fcntl.h locale.h math.h stdio.h stdlib.h string.h sys/stat.h sys/types.h time.h unistd.h wchar.h])
dnl Check for functions
AC_CHECK_FUNCS([calloc malloc realloc free])
@@ -19,6 +19,7 @@ AC_CHECK_FUNCS([setlocale mbstowcs wcsncpy wcstombs])
AC_CHECK_FUNCS([open fstat read close])
AC_CHECK_FUNCS([getopt])
AC_CHECK_FUNCS([signal])
+AC_CHECK_FUNCS([time])
dnl Check for libraries
AC_CHECK_LIB(m, pow, [], AC_MSG_ERROR([math library required]))
diff --git a/contrib/gentoo/app-crypt/bruteforce-salted-openssl/bruteforce-salted-openssl-1.3.3.ebuild b/contrib/gentoo/app-crypt/bruteforce-salted-openssl/bruteforce-salted-openssl-1.3.3.ebuild
new file mode 100644
index 0000000..411deed
--- /dev/null
+++ b/contrib/gentoo/app-crypt/bruteforce-salted-openssl/bruteforce-salted-openssl-1.3.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 2014-2016 Guillaume LE VAILLANT
+# Distributed under the terms of the GNU General Public License v3
+
+EAPI="5"
+
+inherit eutils autotools
+
+DESCRIPTION="A bruteforce cracker for openssl encrypted files."
+HOMEPAGE="https://github.com/glv2/${PN}"
+SRC_URI="https://github.com/glv2/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf
+}
+
+src_install() {
+ einstall
+ dodoc AUTHORS ChangeLog COPYING NEWS README
+}
diff --git a/src/bruteforce-salted-openssl.c b/src/bruteforce-salted-openssl.c
index e158326..2101c94 100644
--- a/src/bruteforce-salted-openssl.c
+++ b/src/bruteforce-salted-openssl.c
@@ -40,11 +40,15 @@ the covered work.
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <time.h>
#include <unistd.h>
#include <wchar.h>
#include "version.h"
+
+#define LAST_PASS_MAX_SHOWN_LENGTH 256
+
unsigned char *default_charset = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
/* 0x00 is not included as passwords are null terminated */
@@ -75,6 +79,8 @@ pthread_mutex_t found_password_lock, dictionary_lock;
char stop = 0, only_one_password = 0, found_password = 0, no_error = 0;
unsigned int nb_threads = 1;
unsigned long long int limit = 0, print = 0, count_limit = 0, count_print = 0;
+unsigned char last_pass[LAST_PASS_MAX_SHOWN_LENGTH];
+time_t start_time;
struct decryption_func_locals
{
unsigned int index_start;
@@ -94,6 +100,9 @@ void handle_signal(int signo)
unsigned int l_full = max_len - suffix_len - prefix_len;
unsigned int l_skip = min_len - suffix_len - prefix_len;
double space = 0;
+ time_t current_time;
+
+ current_time = time(NULL);
if(dictionary == NULL)
for(l = l_skip; l <= l_full; l++)
@@ -103,6 +112,8 @@ void handle_signal(int signo)
total_ops += thread_locals[i].counter;
fprintf(stderr, "Tried passwords: %llu\n", total_ops);
+ fprintf(stderr, "Tried passwords per second: %lf\n", (double) total_ops / (current_time - start_time));
+ fprintf(stderr, "Last tried password: %s\n", last_pass);
if(dictionary == NULL)
fprintf(stderr, "Total space searched: %lf%%\n", (total_ops / space) * 100);
}
@@ -197,6 +208,7 @@ void * decryption_func(void *arg)
exit(EXIT_FAILURE);
}
wcstombs(pwd, password, pwd_len + 1);
+ snprintf(last_pass, LAST_PASS_MAX_SHOWN_LENGTH, "%s", pwd);
/* Decrypt data with password */
EVP_BytesToKey(cipher, digest, salt, pwd, pwd_len, 1, key, iv);
@@ -498,6 +510,7 @@ void * decryption_func_dictionary(void *arg)
ret = read_dictionary_line(&pwd, &pwd_len);
if(ret == 0)
break;
+ snprintf(last_pass, LAST_PASS_MAX_SHOWN_LENGTH, "%s", pwd);
/* Decrypt data with password */
EVP_BytesToKey(cipher, digest, salt, pwd, pwd_len, 1, key, iv);
@@ -938,6 +951,7 @@ int main(int argc, char **argv)
}
}
+ last_pass[0] = '\0';
signal(SIGUSR1, handle_signal);
/* Check header */
@@ -999,6 +1013,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Error: memory allocation failed.\n\n");
exit(EXIT_FAILURE);
}
+ start_time = time(NULL);
for(i = 0; i < nb_threads; i++)
{
if(dictionary == NULL)
diff --git a/src/version.h b/src/version.h
index 7f78fd8..a847d72 100644
--- a/src/version.h
+++ b/src/version.h
@@ -31,6 +31,6 @@ the covered work.
#ifndef VERSION_H
#define VERSION_H 1
-#define VERSION_NUMBER "1.3.2"
+#define VERSION_NUMBER "1.3.3"
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/bruteforce-salted-openssl.git
More information about the forensics-changes
mailing list