Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

RainbowCrack tripcode patch

Name: !hT7zRmFpyY 2008-02-15 7:15


diff -rubB rainbowcrack-1.2-src/src/HashAlgorithm.cpp rainbowcrack+tripcodes/src/HashAlgorithm.cpp
--- rainbowcrack-1.2-src/src/HashAlgorithm.cpp    2003-11-23 00:33:22.000000000 -0500
+++ rainbowcrack+tripcodes/src/HashAlgorithm.cpp    2008-01-14 16:48:59.000000000 -0500
@@ -57,3 +57,58 @@
 {
     SHA1(pPlain, nPlainLen, pHash);
 }
+
+char _s(char c)
+{
+    switch (c) {
+        case ':': return 'A';
+        case ';': return 'B';
+        case '=': return 'D';
+        case '?': return 'F';
+        case '@': return 'G';
+        case '[': return 'a';
+        case '\\':return 'b';
+        case ']': return 'c';
+        case '^': return 'd';
+        case '_': return 'e';
+        case '`': return 'f';
+        case ('/')...('9'):
+        case ('A')...('Z'):
+        case ('a')...('z'):
+            return c;
+        default:
+            return '.';
+    }
+}
+
+#include <string.h>
+void HashTrip(unsigned char* pPlain, int nPlainLen, unsigned char* pHash)
+{
+    // should be long enough for 6 chars overflow ("&quot;") plus 3 more
+    // in the salt for the H.. at the end.
+    char pw[16], salt[16];
+    // raw DES output
+    char output[16];
+    int n, p;
+
+    if (nPlainLen > 8)
+        nPlainLen = 8; // ignore the rest
+    for (n = 0, p = 0; n < nPlainLen && p <= 8; n++) {
+        char c = pPlain[n];
+        switch (c) {
+            case '"': strcat(pw, "&quot;"); p += 6; break;
+            case '\'':strcat(pw, "'" ); p += 5; break;
+            case '<': strcat(pw, "&lt;"  ); p += 4; break;
+            case '>': strcat(pw, "&gt;"  ); p += 4; break;
+            case ',': strcat(pw, "," ); p += 5; break;
+            default:  pw[p++] = c;
+        }
+    }
+    pw[p++] = 0;
+    strcpy(salt, pw);
+    strcat(salt, "H.");
+    salt[1] = _s(salt[1]);
+    salt[2] = _s(salt[2]);
+    DES_fcrypt(pw, salt + 1, output);
+    strcpy((char *) pHash, output + 3);
+}
diff -rubB rainbowcrack-1.2-src/src/HashAlgorithm.h rainbowcrack+tripcodes/src/HashAlgorithm.h
--- rainbowcrack-1.2-src/src/HashAlgorithm.h    2003-11-23 00:33:18.000000000 -0500
+++ rainbowcrack+tripcodes/src/HashAlgorithm.h    2008-01-14 15:48:55.000000000 -0500
@@ -10,5 +10,6 @@
 void HashLM(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
 void HashMD5(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
 void HashSHA1(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
+void HashTrip(unsigned char* pPlain, int nPlainLen, unsigned char* pHash);
 
 #endif
diff -rubB rainbowcrack-1.2-src/src/HashRoutine.cpp rainbowcrack+tripcodes/src/HashRoutine.cpp
--- rainbowcrack-1.2-src/src/HashRoutine.cpp    2003-11-23 00:33:16.000000000 -0500
+++ rainbowcrack+tripcodes/src/HashRoutine.cpp    2008-01-14 15:48:28.000000000 -0500
@@ -20,6 +20,7 @@
     AddHashRoutine("lm",   HashLM,   8);
     AddHashRoutine("md5",  HashMD5,  16);
     AddHashRoutine("sha1", HashSHA1, 20);
+    AddHashRoutine("trip", HashTrip, 10);
 }
 
 CHashRoutine::~CHashRoutine()

Name: Anonymous 2008-02-16 9:02

If you think multithreading in the application is the only way to take advantage of multiple processors, maybe you shouldn't be posting on /prog/.

Name: Anonymous 2008-02-16 9:25

>>41
I'm too lazy to start multiple processes or write a script. I would, but not for something I'll only play with for 5 minutes.

Name: Anonymous 2008-02-16 9:32

>>42
If you think you can generate usable rainbow tables in 5 minutes, maybe you should send me your computer.

Name: Anonymous 2008-02-16 10:23

what range of characters is valid in tripcode input?
Really, [\001-\377]. DES is only 7-bit, but remember there are side effects of using high-bit characters in the second and third positions because they potentially affect the salt used.

what range have you actually used in your rainbow table, and how much space does it take?
I'm using about 400 GB for tables. This includes all 0-4 character tripcodes, all 5-character [A-Za-z0-9./], and an assortment of a bunch of other tables that don't really go together. e.g. I started doing all 5 and 6 characters, but calculated how much it would take for all of them and realized I don't have the disk space (or enough CPUs to do it in an even remotely decent length of time) so I just made some of the tables for 6-8 characters. So really, I could do a lot better but it'd take much greater resources.

Name: Anonymous 2008-02-16 15:07

>>44
DES is only 7-bit
wat

Name: Anonymous 2008-02-16 20:03

>>45
I think he means DES works on the lower range of bytes [00,7F]

Name: Anonymous 2008-02-16 23:27

>>46
Hence the ``wat''. That doesn't make any sense and isn't true.

Name: Anonymous 2008-02-17 0:25

>>47
DES uses a 56-bit key.  crypt() takes the key from the lower 7 bits of each of 8 characters.

Tripcodes, on the other hand, have 58 meaningful bits - the 56 used for the key, and the full bytes in the second and third positions which make up the ``salt'', minus 14 bits of overlap.

Name: Anonymous 2008-02-17 0:28

Who still uses DES? Just calculate the SHA-1 sum of the concatenation of the "password" and some random, secret block of bytes on the server.

Name: Anonymous 2008-02-17 6:17

Every image/textboard on the internet, because it's the standard.

Name: Anonymous 2008-02-17 6:52

>>48
That makes more sense. It's a quirk specific to crypt, not DES.

>>49
SHA-1 is less secure than DES. DES is considered insecure because its keyspace is small enough to bruteforce in reasonable time, but SHA-1 has feasibly exploitable cryptographic vulnerabilities.
Having said that, using a block cipher as a hashing function is always a bad idea, but unfortunately, it has become the standard.

Name: Anonymous 2008-02-17 7:15

[citation needed]

Name: Anonymous 2008-02-17 7:49

The human hand has five fingers.[citation needed]

Name: Anonymous 2008-02-17 9:13

>>53
Four fingers and one thumb, actually.

Name: Anonymous 2008-02-17 10:07

            CRYPT!
CRYPT!
     CRYPT IS THE STANDARD!

Name: Anonymous 2008-02-17 10:14

>>54
DON'T HELP HIM!!!

Name: Anonymous 2008-02-17 13:18

The human hand has five fingers.[>>54]

Name: Anonymous 2008-02-17 13:30

>>54
Thumb is a finger, nigger.

Name: Anonymous 2008-02-17 16:31

I'll settle this finger/thumb thing. Historically, the word "finger" has referred to any of the digits on on a hand, OR any of the digits on a hand except the thumb. So a thumb can be a finger or not depending on what you want to say. The definition that includes the thumb is the older, so I, personally, would consider it to be the "more correct" one.

Name: Anonymous 2008-02-17 16:56

>>59
Thanks, you saved us a lot of time.

Name: Anonymous 2008-02-17 17:08

Your mom can fit 5 fingers. Did I use one or two hands.

Name: Anonymous 2008-02-17 17:08

>>59
[citation needed]

Name: Anonymous 2008-02-17 17:08

>>59
[citation needed]

Name: Anonymous 2008-02-17 17:08

>>62-63
oh shi-

Name: Anonymous 2008-02-17 17:31

>>62
>>63
"...the ancient Indo-European word for five was 'penkwe,' which became 'pente' in Greek, 'quinque' in Latin and 'panca' in Sanskrit. One can immediately see surface similarities between 'penkwe' and the Indo-European roots for fist, 'pnkwstis' and finger 'penkweros.'"

http://query.nytimes.com/gst/fullpage.html?res=990CE2DF1531F934A15755C0A963958260&sec=&spon=&pagewanted=3

Hmm, "finger" came from the word "five."

Name: Anonymous 2008-02-17 18:55

>>52
Faggotry aside, what exactly is it you take issue with?

Name: Anonymous 2008-11-10 4:55

    case ('/')...('9'):

You can do that?

Name: Anonymous 2008-11-10 5:00

>>68
No.

Name: Anonymous 2008-11-10 5:15

Name: Anonymous 2009-02-10 14:21

ITT

Name: Anonymous 2009-02-11 8:20

>>71
bampu pantsu

Name: Anonymous 2009-02-11 8:58

>>73
       
                 ∧_∧   / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
          ( ´∀`) < COOL FREE RINGTONES
        /    |    \________
       /       .|     
       / "⌒ヽ |.イ |
   __ |   .ノ | || |__
  .    ノく__つ∪∪   \
   _((_________\
    ̄ ̄ヽつ ̄ ̄ ̄ ̄ ̄ ̄ | | ̄
   ___________| |

Name: Anonymous 2009-02-11 10:24

>>74
his ears are falling off!

Name: Anonymous 2009-02-11 12:15

>>75

That's what he gets for wearing too much trendy wholesale jewelry.

Name: Anonymous 2009-02-24 12:09

>>35


uhhh, same error.

Anybody knows the solution?

also, 77 get

Name: Anonymous 2009-02-24 12:11

cpp
Found your problem.

Name: Anonymous 2009-02-24 12:13

>>78

wut?

Name: Anonymous 2009-02-24 12:17

>>79

Hax my wuttocks?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List