blob: 3b28c050b2b7137119a39dacd8b91dcb3a2f7057 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Copyright 1999-2007 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.3 2007/11/11 07:00:14 drac Exp $
inherit eutils toolchain-funcs
DESCRIPTION="Hash cracker that precomputes plaintext - ciphertext pairs in advance"
HOMEPAGE="http://www.antsight.com/zsl/rainbowcrack/"
SRC_URI="http://www.antsight.com/zsl/rainbowcrack/${P}-src.zip
http://www.antsight.com/zsl/rainbowcrack/${P}-src-algorithmpatch.zip"
LICENSE="as-is"
SLOT="0"
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"
epatch "${FILESDIR}/${P}-share.patch"
sed -i "s#@@SHARE@@#/usr/share/${P}#g" ChainWalkContext.cpp || die
}
src_compile() {
emake -f makefile.linux CXX=$(tc-getCXX) || 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
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/
}
|