commit 59fc4f2b5390bc3e0c8a221f21545fb5cd7d868154f2fe8f89674d08aab052ff Author: Marcus Meissner Date: Mon Dec 7 07:39:38 2015 +0000 Accepting request 347650 from home:jengelh:dev something recently released in the style of john OBS-URL: https://build.opensuse.org/request/show/347650 OBS-URL: https://build.opensuse.org/package/show/security/hashcat?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-fixes-issue-10-compiler-warning-for-possible-memory-.patch b/0001-fixes-issue-10-compiler-warning-for-possible-memory-.patch new file mode 100644 index 0000000..a14ebfe --- /dev/null +++ b/0001-fixes-issue-10-compiler-warning-for-possible-memory-.patch @@ -0,0 +1,52 @@ +From 1a79f0b2912388cff61d6571da69217dbd877fe4 Mon Sep 17 00:00:00 2001 +From: philsmd +Date: Sat, 5 Dec 2015 11:32:46 +0100 +Subject: [PATCH] fixes issue #10: compiler warning for possible memory problem + (-m 11400 only) + +--- + docs/changes.txt | 7 +++++++ + src/hashcat-cli.c | 11 +++++++++-- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/docs/changes.txt b/docs/changes.txt +index 7f6675d..9c7ecea 100644 +--- a/docs/changes.txt ++++ b/docs/changes.txt +@@ -1,3 +1,10 @@ ++* changes v2.00 -> v2.01: ++ ++type.: Feature ++file.: Host ++desc.: Fix a possible memory problem for hash type -m 11400 = SIP digest authentication (MD5) ++issue: 10 ++ + * changes v0.50 -> v2.00: + + type: Project +diff --git a/src/hashcat-cli.c b/src/hashcat-cli.c +index 8c9c951..0ede840 100644 +--- a/src/hashcat-cli.c ++++ b/src/hashcat-cli.c +@@ -13159,9 +13159,16 @@ void load_hashes (FILE *fp, db_t *db, engine_parameter_t *engine_parameter) + + memset (&salt_search->additional_plain_struct[i].buf, 0, additional_plain_max_len); + +- snprintf (additional_plain_ptr, additional_plain_max_len + 1, "%s:%s:", user_pos, realm_pos); ++ int buf_len = snprintf (additional_plain_ptr, additional_plain_max_len, "%s:%s:", user_pos, realm_pos); + +- salt_search->additional_plain_struct[i].len = user_len + 1 + realm_len + 1; ++ int expected_buf_len = user_len + 1 + realm_len + 1; ++ ++ if (buf_len != expected_buf_len) // this should never occur because buffer is large enough, but we better have a check anyway ++ { ++ log_warning ("username and realm (%d bytes) do not fit within the buffer (%d bytes)", expected_buf_len, buf_len); ++ } ++ ++ salt_search->additional_plain_struct[i].len = buf_len; + } + + salt_t *salt; +-- +2.4.3 + diff --git a/2.00.tar.gz b/2.00.tar.gz new file mode 100644 index 0000000..69ad30f --- /dev/null +++ b/2.00.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6325e6d75a4df3485adec00f74e5887326809c15ed31bfe74a12b62943245444 +size 3463012 diff --git a/hashcat.changes b/hashcat.changes new file mode 100644 index 0000000..e0417e1 --- /dev/null +++ b/hashcat.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sun Dec 6 12:21:38 UTC 2015 - jengelh@inai.de + +- Initial package for build.opensuse.org (version 2.00) diff --git a/hashcat.spec b/hashcat.spec new file mode 100644 index 0000000..2522e89 --- /dev/null +++ b/hashcat.spec @@ -0,0 +1,65 @@ +# +# spec file for package hashcat +# +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: hashcat +Version: 2.00 +Release: 0 +Summary: CPU-based password recovery utility +License: MIT +Group: Productivity/Security +Url: https://hashcat.net/ + +#Git-Clone: git://github.com/hashcat/hashcat +Source: https://github.com/hashcat/hashcat/archive/%version.tar.gz +Patch1: 0001-fixes-issue-10-compiler-warning-for-possible-memory-.patch +BuildRequires: gmp-devel +BuildRoot: %{_tmppath}/%{name}-%{version}-build +ExclusiveArch: %ix86 x86_64 + +%description +Hashcat is an advanced CPU-based password recovery utility, +supporting seven unique modes of testing for over 100 optimized +hashing algorithms. + +%prep +%setup -q +%patch -P 1 -p1 + +%build +make %{?_smp_mflags} CFLAGS="%optflags -Iinclude" LIBGMP_POSIX32="%_prefix" \ + LIBGMP_POSIX64="%_prefix" \ +%ifarch x86_64 + posix64 +%else + posix32 +%endif + +%install +%ifarch x86_64 +install -Dpm 0755 hashcat-cli64.bin "%buildroot/%_bindir/hashcat" +%endif +%ifarch %ix86 +install -Dpm 0755 hashcat-cli32.bin "%buildroot/%_bindir/hashcat" +%endif + +%files +%defattr(-,root,root) +%doc README.md docs/license.txt +%_bindir/hashcat + +%changelog