summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjerry732042018-01-30 12:19:33 +0800
committerjerry732042018-01-30 12:19:33 +0800
commit16b046048e41f1ad47876702315fb34c35a50455 (patch)
treea3d2f5f9fcf37e7587bc88a338464b345d44bb91
parent3c5485fb146810d1faa041d32d9b31e02669b2bd (diff)
downloadaur-samdump2.tar.gz
Updated to 3.0.0-4. Fix compatibility with OpenSSL libs
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD22
-rw-r--r--openssl_compat.patch89
3 files changed, 109 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 38efa2d0f213..eef3da5ef5a3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
# Generated by mksrcinfo v8
-# Thu Dec 29 09:25:03 UTC 2016
+# Tue Jan 30 04:18:59 UTC 2018
pkgbase = samdump2
pkgdesc = Dump password hashes from a Windows NT/2k/XP installation.
pkgver = 3.0.0
- pkgrel = 3
+ pkgrel = 4
url = http://sourceforge.net/projects/ophcrack/files/samdump2/
arch = i686
arch = x86_64
license = GPL
depends = openssl
source = http://downloads.sourceforge.net/ophcrack/samdump2-3.0.0.tar.bz2
- md5sums = 5dac2dc3f8171a3dc86053d923a0e6f5
+ source = openssl_compat.patch
+ sha256sums = 602659af30c565750fa01650e0a223d26355b5df98f2fbc30e3a6c593ed4e526
+ sha256sums = 97ed4fdd55d4cf750b334b0b10a8f345a2771a4150c34d1a138b1abe31a933a3
pkgname = samdump2
diff --git a/PKGBUILD b/PKGBUILD
index ec1342a3c3e7..690dce2d7153 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,24 +2,32 @@
# Previous maintainer: Maxwell Pray a.k.a. Synthead <synthead1@gmail.com>
# Contributor: Jens Pranaitis <jens@jenux.homelinux.org>
# Contributor: Michal Krenek <mikos@sg1.cz>
+# Contributor: SiliciousReese <danieldarnell@protonmail.ch>
pkgname=samdump2
pkgver=3.0.0
-pkgrel=3
+pkgrel=4
pkgdesc='Dump password hashes from a Windows NT/2k/XP installation.'
arch=('i686' 'x86_64')
url='http://sourceforge.net/projects/ophcrack/files/samdump2/'
license=('GPL')
depends=('openssl')
-source=("http://downloads.sourceforge.net/ophcrack/$pkgname-$pkgver.tar.bz2")
-md5sums=('5dac2dc3f8171a3dc86053d923a0e6f5')
+source=("http://downloads.sourceforge.net/ophcrack/$pkgname-$pkgver.tar.bz2"
+ 'openssl_compat.patch')
+sha256sums=('602659af30c565750fa01650e0a223d26355b5df98f2fbc30e3a6c593ed4e526'
+ '97ed4fdd55d4cf750b334b0b10a8f345a2771a4150c34d1a138b1abe31a933a3')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -Np1 < ../openssl_compat.patch
+}
build() {
- cd "$srcdir/$pkgname-$pkgver"
- make LIBS='-lssl -lcrypto' CFLAGS="$CFLAGS"
+ cd "$srcdir/$pkgname-$pkgver"
+ make LIBS='-lssl -lcrypto' CFLAGS="$CFLAGS"
}
package() {
- install -Dm 755 "$srcdir/$pkgname-$pkgver/samdump2" "$pkgdir/usr/bin/samdump2"
- install -Dm 644 "$srcdir/$pkgname-$pkgver/samdump2.1" "$pkgdir/usr/share/man/man1/samdump2.1"
+ install -Dm 755 "$srcdir/$pkgname-$pkgver/samdump2" "$pkgdir/usr/bin/samdump2"
+ install -Dm 644 "$srcdir/$pkgname-$pkgver/samdump2.1" "$pkgdir/usr/share/man/man1/samdump2.1"
}
diff --git a/openssl_compat.patch b/openssl_compat.patch
new file mode 100644
index 000000000000..85dd163ffd43
--- /dev/null
+++ b/openssl_compat.patch
@@ -0,0 +1,89 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2012-04-20 20:27:00.000000000 +0800
++++ b/Makefile 2018-01-30 12:12:55.114072617 +0800
+@@ -30,7 +30,7 @@
+ INSTALL = $(shell which install)
+ CC = $(shell which gcc)
+ CFLAGS = -Wall
+-LIBS = -lssl
++LIBS = -lssl -lcrypto
+
+ # Default target
+ all: build
+diff -Naur a/samdump2.c b/samdump2.c
+--- a/samdump2.c 2012-04-20 20:27:00.000000000 +0800
++++ b/samdump2.c 2018-01-30 12:10:49.627208011 +0800
+@@ -58,7 +58,7 @@
+
+ void str_to_key(unsigned char *str,unsigned char *key)
+ {
+- // void des_set_odd_parity(des_cblock *);
++ // void DES_set_odd_parity(DES_cblock *);
+ int i;
+
+ key[0] = str[0]>>1;
+@@ -72,7 +72,7 @@
+ for (i=0;i<8;i++) {
+ key[i] = (key[i]<<1);
+ }
+- des_set_odd_parity((des_cblock *)key);
++ DES_set_odd_parity((DES_cblock *)key);
+ }
+
+ /*
+@@ -210,8 +210,8 @@
+ unsigned char hbootkey[0x20];
+
+ /* Des */
+- des_key_schedule ks1, ks2;
+- des_cblock deskey1, deskey2;
++ DES_key_schedule ks1, ks2;
++ DES_cblock deskey1, deskey2;
+
+ int i, j;
+
+@@ -419,15 +419,15 @@
+
+ /* Get the two decrpt keys. */
+ sid_to_key1(rid,(unsigned char *)deskey1);
+- des_set_key_checked((des_cblock *)deskey1,ks1);
++ DES_set_key_checked((DES_cblock *)deskey1, &ks1);
+ sid_to_key2(rid,(unsigned char *)deskey2);
+- des_set_key_unchecked((des_cblock *)deskey2,ks2);
++ DES_set_key_unchecked((DES_cblock *)deskey2, &ks2);
+
+ /* Decrypt the lanman password hash as two 8 byte blocks. */
+- des_ecb_encrypt((des_cblock *)obfkey,
+- (des_cblock *)fb, ks1, DES_DECRYPT);
+- des_ecb_encrypt((des_cblock *)(obfkey + 8),
+- (des_cblock *)&fb[8], ks2, DES_DECRYPT);
++ DES_ecb_encrypt((DES_cblock *)obfkey,
++ (DES_cblock *)fb, &ks1, DES_DECRYPT);
++ DES_ecb_encrypt((DES_cblock *)(obfkey + 8),
++ (DES_cblock *)&fb[8], &ks2, DES_DECRYPT);
+
+
+
+@@ -472,16 +472,16 @@
+ if (lm_size != 0x14) {
+ /* Get the two decrpt keys. */
+ sid_to_key1(rid,(unsigned char *)deskey1);
+- des_set_key((des_cblock *)deskey1,ks1);
++ DES_set_key((DES_cblock *)deskey1, &ks1);
+ sid_to_key2(rid,(unsigned char *)deskey2);
+- des_set_key((des_cblock *)deskey2,ks2);
++ DES_set_key((DES_cblock *)deskey2, &ks2);
+ }
+
+ /* Decrypt the NT md4 password hash as two 8 byte blocks. */
+- des_ecb_encrypt((des_cblock *)obfkey,
+- (des_cblock *)fb, ks1, DES_DECRYPT);
+- des_ecb_encrypt((des_cblock *)(obfkey + 8),
+- (des_cblock *)&fb[8], ks2, DES_DECRYPT);
++ DES_ecb_encrypt((DES_cblock *)obfkey,
++ (DES_cblock *)fb, &ks1, DES_DECRYPT);
++ DES_ecb_encrypt((DES_cblock *)(obfkey + 8),
++ (DES_cblock *)&fb[8], &ks2, DES_DECRYPT);
+
+ /* sf27 wrap to sf25 */
+ //sf27( obfkey, (int*)&rid, fb );