Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 153487
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Daniel Black <dragonheart@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Roger Ward <rogerw@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
rainbowcrack-1.2-src-charsetpatch.patch Patch to hardcode the default path of charset.txt as an *alternative* into rtgen and rtdump patch Roger Ward 2006-10-30 15:46 0000 989 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 153487 depends on: Show dependency tree
Bug 153487 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-10-30 15:43 0000
rainbowcrack, a password hash algorithm, has no default charset.txt path in its
code.  In Gentoo, the charset.txt file gets installed to
/usr/share/rainbowcrack/charset.txt, but this file is never (automatically)
chosen - it fails if one is not found in the local path (i.e. where the code is
executed from).  While this is normal for most uses of the program, it is
somewhat expected  that programs will try and use a set of "Defaults"
especially when first running a program and before customizations begin.  

Some uses might not even require this patch - but it would help usability, in
general.

I'm sure there is a standard way to patch this, but here's the patch I came up
with that makes it work (tm) :).

Please respond with patch format questions, mainly because I'd like to fix the
patch even if its not accepted into Gentoo, to know how to do it in the future.

-Roger Ward


-- 
rainbowcrack-1.2-src-charsetpath.patch
--
diff -rU9 rainbowcrack-1.2-src/src/ChainWalkContext.cpp
rainbowcrack-1.2-src.orig/src/ChainWalkContext.cpp
--- rainbowcrack-1.2-src/src/ChainWalkContext.cpp       2006-10-30
18:39:55.000000000 -0500
+++ rainbowcrack-1.2-src.orig/src/ChainWalkContext.cpp  2003-11-23
00:33:44.000000000 -0500
@@ -52,25 +52,19 @@
                for (i = 0x00; i <= 0xff; i++)

                        m_PlainCharset[i] = i;

                m_nPlainCharsetLen = 256;

                m_sPlainCharsetName = sName;

                m_sPlainCharsetContent = "0x00, 0x01, ... 0xff";

                return true;

        }



        vector<string> vLine;

-       if (!ReadLinesFromFile("charset.txt", vLine))

-       {

-               ReadLinesFromFile("/usr/share/rainbowcrack/charset.txt",
vLine);

-               if  (vLine.size()>0)

-                       printf("Read charset.txt from default
/usr/share/rainbowcrack/\n");

-       }

-       if (vLine.size()>0)

+       if (ReadLinesFromFile("charset.txt", vLine))

        {

                int i;

                for (i = 0; i < vLine.size(); i++)

                {

                        // Filter comment

                        if (vLine[i][0] == '#')

                                continue;



                        vector<string> vPart;

------- Comment #1 From Roger Ward 2006-10-30 15:46:55 0000 -------
Created an attachment (id=100834) [details]
Patch to hardcode the default path of charset.txt as an *alternative* into
rtgen and rtdump

------- Comment #2 From Alon Bar-Lev (RETIRED) 2006-11-01 11:26:30 0000 -------
Thanks!
Added rainbowcrack-1.2-r1.
Fixed somewhat differently, please check it out.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug