<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FSCK &#187; rainbowcrack</title>
	<atom:link href="http://blog.fsck.hu/index.php/tag/rainbowcrack/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fsck.hu</link>
	<description>Everything Goes!</description>
	<lastBuildDate>Sun, 19 Jul 2009 17:49:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rainbowcrack meg a Debian</title>
		<link>http://blog.fsck.hu/index.php/2009/06/18/rainbowcrack-meg-a-debian/</link>
		<comments>http://blog.fsck.hu/index.php/2009/06/18/rainbowcrack-meg-a-debian/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 17:15:00 +0000</pubDate>
		<dc:creator>Kerekes Attila</dc:creator>
				<category><![CDATA[Kriptográfia]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[rainbowcrack]]></category>

		<guid isPermaLink="false">http://blog.fsck.hu/?p=14</guid>
		<description><![CDATA[Mivel egyre aktívabban foglalkozom szivárványtáblás kódvisszafejtésekkel, gondoltam beszerzem a RainbowCrack programcsomagot is. Leginkább nem is az rcrack hanem az rtgen miatt. Linuxra ahogy néztem az 1.2-es verzió érhető el a hivatalos honlapról. Letöltöttem, kicsomagoltam, majd a readme alapján nekifutottam egy make -f makefile.linux paranccsal. Az eredmény lenyűgöző volt:

rogue:~/tools/rainbowcrack-1.2-src/src# make -f makefile.linux
g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp [...]]]></description>
			<content:encoded><![CDATA[<p>Mivel egyre aktívabban foglalkozom szivárványtáblás kódvisszafejtésekkel, gondoltam beszerzem a <a href="http://project-rainbowcrack.com/">RainbowCrack</a> programcsomagot is. Leginkább nem is az rcrack hanem az rtgen miatt. Linuxra ahogy néztem az 1.2-es verzió érhető el a <a href="http://project-rainbowcrack.com/">hivatalos honlapról</a>. Letöltöttem, kicsomagoltam, majd a readme alapján nekifutottam egy make -f makefile.linux paranccsal. Az eredmény lenyűgöző volt:</p>
<pre class="brush: plain;">
rogue:~/tools/rainbowcrack-1.2-src/src# make -f makefile.linux
g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableGenerate.cpp -lssl -O3 -o rtgen
In file included from Public.cpp:11:
Public.h:25: error: u_int64_t does not name a type
Public.h:26: error: u_int64_t does not name a type
Public.h:37: error: u_int64_t was not declared in this scope
Public.h:38: error: u_int64_t was not declared in this scope
Public.cpp:113: error: redefinition of std::string uint64tostr
Public.h:37: error: std::string uint64tostr previously declared here
Public.cpp:113: error: u_int64_t was not declared in this scope
Public.cpp:126: error: redefinition of std::string uint64tohexstr
Public.h:38: error: std::string uint64tohexstr previously declared here
Public.cpp:126: error: u_int64_t was not declared in this scope
In file included from ChainWalkContext.h:11,
       from ChainWalkContext.cpp:11:
Public.h:25: error: u_int64_t does not name a type
Public.h:26: error: u_int64_t does not name a type
Public.h:37: error: u_int64_t was not declared in this scope
Public.h:38: error: u_int64_t was not declared in this scope
In file included from ChainWalkContext.cpp:11:
ChainWalkContext.h:30: error: u_int64_t does not name a type
ChainWalkContext.h:31: error: u_int64_t does not name a type
ChainWalkContext.h:34: error: u_int64_t does not name a type
ChainWalkContext.h:37: error: u_int64_t does not name a type
ChainWalkContext.h:56: error: u_int64_t does not name a type
ChainWalkContext.h:61: error: u_int64_t has not been declared
ChainWalkContext.h:68: error: u_int64_t does not name a type
ChainWalkContext.cpp:31: error: u_int64_t CChainWalkContext::m_nPlainSpaceUpToX [257] is not a static member of class CChainWalkContext
ChainWalkContext.cpp:32: error: u_int64_t CChainWalkContext::m_nPlainSpaceTotal is not a static member of class CChainWalkContext
ChainWalkContext.cpp:35: error: u_int64_t CChainWalkContext::m_nReduceOffset is not a static member of class CChainWalkContext
ChainWalkContext.cpp: In static member function static bool CChainWalkContext::LoadCharset(std::string):
ChainWalkContext.cpp:119: error: memcpy was not declared in this scope
ChainWalkContext.cpp: In static member function static bool CChainWalkContext::SetPlainCharset(std::string, int, int):
ChainWalkContext.cpp:165: error: m_nPlainSpaceUpToX was not declared in this scope
ChainWalkContext.cpp:178: error: m_nPlainSpaceTotal was not declared in this scope
ChainWalkContext.cpp: In static member function static bool CChainWalkContext::SetRainbowTableIndex(int):
ChainWalkContext.cpp:188: error: m_nReduceOffset was not declared in this scope
ChainWalkContext.cpp: At global scope:
ChainWalkContext.cpp:303: error: no u_int64_t CChainWalkContext::GetPlainSpaceTotal() member function declared in class CChainWalkContext
ChainWalkContext.cpp: In static member function static void CChainWalkContext::Dump():
ChainWalkContext.cpp:339: error: m_nPlainSpaceTotal was not declared in this scope
ChainWalkContext.cpp:342: error: m_nReduceOffset was not declared in this scope
ChainWalkContext.cpp: In member function void CChainWalkContext::GenerateRandomIndex():
ChainWalkContext.cpp:348: error: m_nIndex was not declared in this scope
ChainWalkContext.cpp:349: error: m_nPlainSpaceTotal was not declared in this scope
ChainWalkContext.cpp: At global scope:
ChainWalkContext.cpp:352: error: prototype for void CChainWalkContext::SetIndex(u_int64_t) does not match any in class CChainWalkContext
ChainWalkContext.h:61: error: candidate is: void CChainWalkContext::SetIndex(int)
ChainWalkContext.cpp: In member function void CChainWalkContext::SetHash(unsigned char*):
ChainWalkContext.cpp:359: error: memcpy was not declared in this scope
ChainWalkContext.cpp: In member function void CChainWalkContext::IndexToPlain():
ChainWalkContext.cpp:367: error: m_nIndex was not declared in this scope
ChainWalkContext.cpp:367: error: m_nPlainSpaceUpToX was not declared in this scope
ChainWalkContext.cpp:374: error: m_nIndex was not declared in this scope
ChainWalkContext.cpp:374: error: m_nPlainSpaceUpToX was not declared in this scope
ChainWalkContext.cpp: In member function void CChainWalkContext::HashToIndex(int):
ChainWalkContext.cpp:438: error: m_nIndex was not declared in this scope
ChainWalkContext.cpp:438: error: m_nReduceOffset was not declared in this scope
ChainWalkContext.cpp:438: error: m_nPlainSpaceTotal was not declared in this scope
ChainWalkContext.cpp: At global scope:
ChainWalkContext.cpp:441: error: no u_int64_t CChainWalkContext::GetIndex() member function declared in class CChainWalkContext
ChainWalkContext.cpp: In member function bool CChainWalkContext::CheckHash(unsigned char*):
ChainWalkContext.cpp:491: error: memcmp was not declared in this scope
In file included from ChainWalkContext.h:11,
       from RainbowTableGenerate.cpp:18:
Public.h:25: error: u_int64_t does not name a type
Public.h:26: error: u_int64_t does not name a type
Public.h:37: error: u_int64_t was not declared in this scope
Public.h:38: error: u_int64_t was not declared in this scope
In file included from RainbowTableGenerate.cpp:18:
ChainWalkContext.h:30: error: u_int64_t does not name a type
ChainWalkContext.h:31: error: u_int64_t does not name a type
ChainWalkContext.h:34: error: u_int64_t does not name a type
ChainWalkContext.h:37: error: u_int64_t does not name a type
ChainWalkContext.h:56: error: u_int64_t does not name a type
ChainWalkContext.h:61: error: u_int64_t has not been declared
ChainWalkContext.h:68: error: u_int64_t does not name a type
RainbowTableGenerate.cpp: In function int main(int, char**):
RainbowTableGenerate.cpp:113: error: strcmp was not declared in this scope
RainbowTableGenerate.cpp:115: error: atoi was not declared in this scope
RainbowTableGenerate.cpp:128: error: atoi was not declared in this scope
RainbowTableGenerate.cpp:207: error: u_int64_t was not declared in this scope
RainbowTableGenerate.cpp:207: error: expected `;' before nIndex
RainbowTableGenerate.cpp:208: error: nIndex was not declared in this scope
RainbowTableGenerate.cpp:222: error: nIndex was not declared in this scope
RainbowTableGenerate.cpp:222: error: class CChainWalkContext has no member named GetIndex
make: *** [rtgen] Error 1
</pre>
<p>Vajon az idő járt el a forrás felett, vagy sose fordult csak úgy Debianon? Mindenesetre kicsit komolyabban átnézve a logot, egyértelmű volt, hogy a <span style="font-weight: bold; font-style: italic;">Public.h</span> -ban nem stimmel valami, amihez bizony az u_int64_t -nek is köze van. Azonnal elő is kaptam kedvenc vim editorom, és néztem vajon mik hiányoznak. A fájl elején az #include-k között kell keresni a hibát:</p>
<pre class="brush: cpp;">rogue:~/tools/rainbowcrack-1.2-src/src# vi Public.h
...
#include &lt;stdio.h&gt;

#include &lt;string&gt;
#include &lt;vector&gt;
#include &lt;list&gt;
...</pre>
<p>Ami innét hiányzik nekünk az a <span style="font-weight: bold; font-style: italic;">cstdlib</span> és a <span style="font-weight: bold; font-style: italic;">cstring</span>. Orvosoljuk a hibát, a header fájl eleje így nézzen ki:</p>
<pre class="brush: cpp;">rogue:~/tools/rainbowcrack-1.2-src/src# vi Public.h

...

#include &lt;stdio.h&gt;

#include &lt;string&gt;
#include &lt;vector&gt;
#include &lt;list&gt;
#include &lt;cstring&gt;
#include &lt;cstdlib&gt;
...</pre>
<p>Ezek után nekifutva a fordításnak ezt kapjuk:</p>
<pre class="brush: plain;">rogue:~/tools/rainbowcrack-1.2-src/src# make -f makefile.linux
g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableGenerate.cpp -lssl -O3 -o rtgen
g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp RainbowTableDump.cpp -lssl -o rtdump
g++ Public.cpp RainbowTableSort.cpp -o rtsort
RainbowTableSort.cpp: In function ‘int QuickSortPartition(RainbowChain*, int, int)’:
RainbowTableSort.cpp:37: warning: integer overflow in expression
g++ Public.cpp ChainWalkContext.cpp HashAlgorithm.cpp HashRoutine.cpp HashSet.cpp MemoryPool.cpp ChainWalkSet.cpp CrackEngine.cpp RainbowCrack.cpp -lssl -O3 -o rcrack</pre>
<p>És már működik is minden, nyugodtan generálhatjuk a szivárvány táblázatainkat a nagyvilágnak :)</p>
<p>#eof</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fsck.hu/index.php/2009/06/18/rainbowcrack-meg-a-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
