summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDane Smith <smitdane@gmail.com>2010-08-09 13:13:07 -0400
committerDane Smith <smitdane@gmail.com>2010-08-09 13:13:07 -0400
commit69c7a0bc135d3fc6256177c18f119253e380b7e1 (patch)
tree15acfe30ad8e01309cb1d35ce826970c027de98d /app-crypt
parentFixed hostmap ebuild (diff)
downloadsmithdanea-69c7a0bc135d3fc6256177c18f119253e380b7e1.tar.gz
smithdanea-69c7a0bc135d3fc6256177c18f119253e380b7e1.tar.bz2
smithdanea-69c7a0bc135d3fc6256177c18f119253e380b7e1.zip
Updated ebuild for rainbowcrack
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/rainbowcrack/ChangeLog16
-rw-r--r--app-crypt/rainbowcrack/Manifest11
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch67
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch29
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch51
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch12
-rw-r--r--app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch10
-rw-r--r--app-crypt/rainbowcrack/metadata.xml18
-rw-r--r--app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild65
9 files changed, 279 insertions, 0 deletions
diff --git a/app-crypt/rainbowcrack/ChangeLog b/app-crypt/rainbowcrack/ChangeLog
new file mode 100644
index 0000000..9f8f17d
--- /dev/null
+++ b/app-crypt/rainbowcrack/ChangeLog
@@ -0,0 +1,16 @@
+# ChangeLog for app-crypt/rainbowcrack
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*rainbowcrack-1.2-r1 (09 Aug 2010)
+
+ 09 Aug 2010; Dane Smith (c1pher) <smithdanea@gmail.com>
+ +rainbowcrack-1.2-r1.ebuild, +files/rainbowcrack-1.2+gcc-4.3.patch,
+ +files/rainbowcrack-1.2-makefile.patch,
+ +files/rainbowcrack-1.2-openssl-1.patch,
+ +files/rainbowcrack-1.2-share.patch, +files/rainbowcrack-1.2-types.patch,
+ +metadata.xml:
+ Updated ebuild for rainbowcrack. Address bug 331877.
+ Need to remove old ${P}-makefile.patch and replace with mine.
+ Need to remove old ${P}-asneeded.patch.
+
diff --git a/app-crypt/rainbowcrack/Manifest b/app-crypt/rainbowcrack/Manifest
new file mode 100644
index 0000000..560922b
--- /dev/null
+++ b/app-crypt/rainbowcrack/Manifest
@@ -0,0 +1,11 @@
+AUX rainbowcrack-1.2+gcc-4.3.patch 2614 RMD160 85f1a03f1a949d73a201dd5c8e950024092332be SHA1 9679029c5a8fe1a7e3ad51d8a8d1aaaab70ea173 SHA256 6746563b8c89e3e09d9e303f39c6d2f7dbe84c2c91422b7d0add3753a0c92fa0
+AUX rainbowcrack-1.2-makefile.patch 1431 RMD160 410dd8f1204116efeb6a6c778a9afad8bd93448b SHA1 e8309493e7332a7cc75c41db65b5e0998f92668f SHA256 4f387794d80528967c8e0e2e7495bd2c951501c77e7dc9aeebbe6ef063343a7e
+AUX rainbowcrack-1.2-openssl-1.patch 1409 RMD160 a5a31333358deb01360eeb58c8cda584598a25cf SHA1 71af69c1cb7a1758fefa147d7ea1b258865626cb SHA256 3eb3455f2908dae4e2d642cf175799d5fce3351adc449f448a41801d7cb275e9
+AUX rainbowcrack-1.2-share.patch 579 RMD160 5831f6872c8fa2affca87741ef03de8e05376e27 SHA1 2b38810045004c9732e93dcb30ddc13fb6e4aa26 SHA256 63d2da05ca27c79e758c87cef42c877a1bf57daa0ae81493b6693cfaf02574e8
+AUX rainbowcrack-1.2-types.patch 299 RMD160 bd0d5e48244c55741398da3b63241515c6e68730 SHA1 54535cd8fc91c6eae4275515bc6aa0010b67200d SHA256 56a99d1593c55484aefe253ed3014a2c3eaca9d62cb6fbc2a550171dc36f0ef2
+DIST rainbowcrack-1.2-src-algorithmpatch.zip 3029 RMD160 3293cfcf69677ca6812333dd97952f0e354ce96a SHA1 22697cc8bbeeded21a1863329a2666e9a6fb1268 SHA256 ccc646087692da1e02b1921f97d6c9d2784534153f4570b62de0f122c4c3b322
+DIST rainbowcrack-1.2-src.zip 44742 RMD160 51fdcf84ebfbe8ebb9e5bc6c3d4452f9d158eb79 SHA1 b077a654133cd108a3c619d66482e1796d56b0dc SHA256 238485eeede5140cfc66b88761ec976b7af8b5557ec5bd4eddbcd98830a34dac
+EBUILD rainbowcrack-1.2-r1.ebuild 2011 RMD160 5a978dd235e0bc2af26d982e80f2e87b20952edc SHA1 9986d256b9b0fd440b096672d545e4d6b0c7507e SHA256 379578ba0b43843d6e30d27d97058ea30e0bc5a575589b49b6fa8923d80ebcc5
+MISC ChangeLog 627 RMD160 1e4f6624e5ae74b2480655d335ec857b41939d18 SHA1 ae949bd2b906659b6f77c09f03bb43101b228fb4 SHA256 d3f3e5496ff315c542656e41b322d1c1f41bdfdcb7d977c686400c66c2ceacba
+MISC ChangeLog.new~ 484 RMD160 72a9e10278d51dc262c757239c93a6512b26d565 SHA1 027d213417ec69d313dec31ed423d5ceb8935928 SHA256 c001148bea211c834c972931e1175e9808e2a7459e9f93c2a07695fb8419cadd
+MISC metadata.xml 988 RMD160 183293dd3ff7a2a9fa4e6d4bf96992a65373a3c6 SHA1 07dc36220f7b4bdd6f6ebbdff3c9c89f358f1de5 SHA256 3a19812834671dc4d343f678fe3c609acd169519d511d01eca82c56e9b0ba041
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch
new file mode 100644
index 0000000..cc3fb0c
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2+gcc-4.3.patch
@@ -0,0 +1,67 @@
+diff -aur rainbowcrack-1.2-src.old/src/ChainWalkContext.cpp rainbowcrack-1.2-src/src/ChainWalkContext.cpp
+--- rainbowcrack-1.2-src.old/src/ChainWalkContext.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/ChainWalkContext.cpp 2008-12-11 20:56:15.000000000 +0100
+@@ -10,6 +10,7 @@
+
+ #include "ChainWalkContext.h"
+
++#include <cstring>
+ #include <ctype.h>
+ #include <openssl/rand.h>
+ #ifdef _WIN32
+diff -aur rainbowcrack-1.2-src.old/src/ChainWalkSet.cpp rainbowcrack-1.2-src/src/ChainWalkSet.cpp
+--- rainbowcrack-1.2-src.old/src/ChainWalkSet.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/ChainWalkSet.cpp 2008-12-11 20:59:07.000000000 +0100
+@@ -8,6 +8,7 @@
+ #pragma warning(disable : 4786)
+ #endif
+
++#include <cstring>
+ #include "ChainWalkSet.h"
+
+ CChainWalkSet::CChainWalkSet()
+diff -aur rainbowcrack-1.2-src.old/src/RainbowCrack.cpp rainbowcrack-1.2-src/src/RainbowCrack.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowCrack.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowCrack.cpp 2008-12-11 20:59:48.000000000 +0100
+@@ -18,6 +18,7 @@
+ #include <unistd.h>
+ #endif
+
++#include <cstring>
+ #include <openssl/md4.h>
+ #ifdef _WIN32
+ #pragma comment(lib, "libeay32.lib")
+diff -aur rainbowcrack-1.2-src.old/src/RainbowTableDump.cpp rainbowcrack-1.2-src/src/RainbowTableDump.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowTableDump.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowTableDump.cpp 2008-12-11 20:57:57.000000000 +0100
+@@ -4,6 +4,7 @@
+ Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ */
+
++#include <algorithm>
+ #include "ChainWalkContext.h"
+
+ int main(int argc, char* argv[])
+diff -aur rainbowcrack-1.2-src.old/src/RainbowTableGenerate.cpp rainbowcrack-1.2-src/src/RainbowTableGenerate.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowTableGenerate.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowTableGenerate.cpp 2008-12-11 20:57:29.000000000 +0100
+@@ -15,6 +15,8 @@
+ #endif
+ #include <time.h>
+
++#include <cstring>
++#include <algorithm>
+ #include "ChainWalkContext.h"
+
+ void Usage()
+diff -aur rainbowcrack-1.2-src.old/src/RainbowTableSort.cpp rainbowcrack-1.2-src/src/RainbowTableSort.cpp
+--- rainbowcrack-1.2-src.old/src/RainbowTableSort.cpp 2008-12-11 20:55:23.000000000 +0100
++++ rainbowcrack-1.2-src/src/RainbowTableSort.cpp 2008-12-11 20:58:43.000000000 +0100
+@@ -4,6 +4,7 @@
+ Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ */
+
++#include <cstdlib>
+ #include "Public.h"
+
+ #define ASSUMED_MIN_MEMORY 32 * 1024 * 1024
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch
new file mode 100644
index 0000000..87e38fe
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-makefile.patch
@@ -0,0 +1,29 @@
+--- makefile.linux 2003-11-16 22:38:20.000000000 -0500
++++ Makefile 2010-08-09 13:10:59.000000000 -0400
+@@ -1,14 +1,18 @@
++OBJS = Public.o ChainWalkContext.o ChainWalkSet.o CrackEngine.o HashAlgorithm.o HashSet.o HashRoutine.o MemoryPool.o RainbowCrack.o RainbowTableDump.o RainbowTableGenerate.o RainbowTableSort.o
+
+ all: rtgen rtdump rtsort rcrack
+
+-rtgen:
+- g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableGenerate.cpp -lssl -O3 -o rtgen
++rtgen: $(OBJS)
++ $(CXX) -lssl -lcrypto $(LDFLAGS) Public.o ChainWalkContext.o HashAlgorithm.o HashRoutine.o RainbowTableGenerate.o -o rtgen
+
+-rtdump:
+- g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableDump.cpp -lssl -o rtdump
++rtdump: $(OBJS)
++ $(CXX) -lssl -lcrypto $(LDFLAGS) Public.o ChainWalkContext.o HashAlgorithm.o HashRoutine.o RainbowTableDump.o -o rtdump
+
+-rtsort:
+- g++ Public.cpp RainbowTableSort.cpp -o rtsort
++rtsort: $(OBJS)
++ $(CXX) $(LDFLAGS) Public.o RainbowTableSort.o -o rtsort
+
+-rcrack:
+- g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp HashSet.cpp MemoryPool.cpp ChainWalkSet.cpp CrackEngine.cpp RainbowCrack.cpp -lssl -O3 -o rcrack
++rcrack: $(OBJS)
++ $(CXX) -lssl -lcrypto $(LDFLAGS) Public.o ChainWalkContext.o HashAlgorithm.o HashRoutine.o HashSet.o MemoryPool.o ChainWalkSet.o CrackEngine.o RainbowCrack.o -o rcrack
++
++clean:
++ rm -f $(OBJS) rtgen rtdump rtsort rcrack
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch
new file mode 100644
index 0000000..e694e45
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-openssl-1.patch
@@ -0,0 +1,51 @@
+http://bugs.gentoo.org/327373
+
+--- src/HashAlgorithm.cpp
++++ src/HashAlgorithm.cpp
+@@ -9,7 +9,9 @@
+ #include "Public.h"
+
+ #include <openssl/des.h>
++#ifndef no_md2_h
+ #include <openssl/md2.h>
++#endif
+ #include <openssl/md4.h>
+ #include <openssl/md5.h>
+ #include <openssl/sha.h>
+@@ -66,10 +68,12 @@
+ MD4(UnicodePlain, nPlainLen * 2, pHash);
+ }
+
++#ifndef no_md2_h
+ void HashMD2(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
+ {
+ MD2(pPlain, nPlainLen, pHash);
+ }
++#endif
+
+ void HashMD4(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
+ {
+--- src/HashAlgorithm.h
++++ src/HashAlgorithm.h
+@@ -10,7 +10,9 @@
+ void HashLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+ void HashNTLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+
++#ifndef no_md2_h
+ void HashMD2(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
++#endif
+ void HashMD4(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+ void HashMD5(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+
+--- src/HashRoutine.cpp
++++ src/HashRoutine.cpp
+@@ -19,7 +19,9 @@
+
+ AddHashRoutine("lm", HashLM, 8);
+ AddHashRoutine("ntlm", HashNTLM, 16);
++ #ifndef no_md2_h
+ AddHashRoutine("md2", HashMD2, 16);
++ #endif
+ AddHashRoutine("md4", HashMD4, 16);
+ AddHashRoutine("md5", HashMD5, 16);
+ AddHashRoutine("sha1", HashSHA1, 20);
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch
new file mode 100644
index 0000000..2cf75ca
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-share.patch
@@ -0,0 +1,12 @@
+diff -urNp rainbowcrack-1.2-src.org/src/ChainWalkContext.cpp rainbowcrack-1.2-src/src/ChainWalkContext.cpp
+--- rainbowcrack-1.2-src.org/src/ChainWalkContext.cpp 2003-11-23 00:33:44.000000000 +0200
++++ rainbowcrack-1.2-src/src/ChainWalkContext.cpp 2006-11-01 21:05:13.000000000 +0200
+@@ -58,7 +58,7 @@ bool CChainWalkContext::LoadCharset(stri
+ }
+
+ vector<string> vLine;
+- if (ReadLinesFromFile("charset.txt", vLine))
++ if (ReadLinesFromFile("charset.txt", vLine) || ReadLinesFromFile("@@SHARE@@/charset.txt", vLine))
+ {
+ int i;
+ for (i = 0; i < vLine.size(); i++)
diff --git a/app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch
new file mode 100644
index 0000000..67f3e0a
--- /dev/null
+++ b/app-crypt/rainbowcrack/files/rainbowcrack-1.2-types.patch
@@ -0,0 +1,10 @@
+--- ./rainbowcrack-1.2-src-orig/src/Public.h 2003-11-23 00:32:50.000000000 +1100
++++ ./rainbowcrack-1.2-src/src/Public.h 2008-06-21 00:27:18.000000000 +1000
+@@ -17,6 +17,7 @@
+ #ifdef _WIN32
+ #define uint64 unsigned __int64
+ #else
++#include <sys/types.h>
+ #define uint64 u_int64_t
+ #endif
+
diff --git a/app-crypt/rainbowcrack/metadata.xml b/app-crypt/rainbowcrack/metadata.xml
new file mode 100644
index 0000000..07d8930
--- /dev/null
+++ b/app-crypt/rainbowcrack/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>crypto</herd>
+<maintainer>
+ <email>dragonheart@gentoo.org</email>
+ <name>Daniel Black</name>
+</maintainer>
+<longdescription>
+RainbowCrack is a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
+ In short, the RainbowCrack tool is a password cracker. A traditional brute force cracker try all possible
+plaintexts one by one in cracking time. It is time consuming to break complex password in this way. The idea of
+time-memory trade-off is to do all cracking time computation in advance and store the result in files so called
+"rainbow table". It does take a long time to precompute the tables. But once the one time precomputation is
+finished, a time-memory trade-off cracker can be hundreds of times faster than a brute force cracker, with the
+help of precomputed tables.
+</longdescription>
+</pkgmetadata>
diff --git a/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild b/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild
new file mode 100644
index 0000000..34bb2be
--- /dev/null
+++ b/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/rainbowcrack/rainbowcrack-1.2-r1.ebuild,v 1.9 2010/07/11 06:58:44 ssuominen Exp $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Hash cracker that precomputes plaintext - ciphertext pairs in advance"
+HOMEPAGE="http://project-rainbowcrack.com/"
+
+SRC_URI="http://project-rainbowcrack.com/${P}-src.zip
+ http://http://project-rainbowcrack.com/${P}-src-algorithmpatch.zip"
+
+LICENSE="as-is"
+SLOT="0"
+# contains ix86 ASM
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl"
+DEPEND="${RDEPEND} app-arch/unzip"
+
+MY_P=${P}-src
+S=${WORKDIR}/${MY_P}/src
+
+src_unpack() {
+ unpack ${A} || die "unpack failed"
+ cd "${S}"
+ mv "${WORKDIR}/${P}"-src-algorithmpatch/Hash* "${S}"
+ epatch "${FILESDIR}/${P}-makefile.patch" \
+ "${FILESDIR}/${P}-share.patch" \
+ "${FILESDIR}/${P}-types.patch" \
+ "${FILESDIR}/${P}+gcc-4.3.patch" \
+ "${FILESDIR}/${P}-openssl-1.patch"
+ sed -i "s#@@SHARE@@#/usr/share/${P}#g" ChainWalkContext.cpp || die
+}
+
+src_compile() {
+ # No ./configure script so we assume md2.h is missing if OpenSSL >= 1.0.0
+ has_version ">=dev-libs/openssl-1.0.0" && append-flags -Dno_md2_h
+ emake -f makefile.linux CXX=$(tc-getCXX) LD=$(tc-getLD) || die "make failed"
+}
+
+src_test() {
+ einfo "generating rainbow tables (password maps)"
+ ./rtgen sha1 loweralpha 7 7 0 1000 160 test
+ einfo "sorting tables"
+ ./rtsort *.rt
+ einfo "attempting crack of 7 character random sha1 lowercase passwords"
+ ./rcrack ./*.rt -l 'random_sha1_loweralpha#1-7.hash'
+ einfo "I haven't rigged this so it finds anything yet. Submissions welcome bugs.gentoo.org"
+}
+
+src_install() {
+ dobin rtgen rtdump rtsort rcrack || die "dobin failed"
+ insinto "/usr/share/${P}"
+ doins charset.txt
+
+ dodoc *.plain *.hash
+
+ newdoc "${WORKDIR}/${P}-src-algorithmpatch/readme.txt" algorithm_readme.txt
+
+ cd "${WORKDIR}/${MY_P}"
+ dodoc readme.txt readme_src.txt disclaimer.txt
+ dohtml -r doc/
+}