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 2009-02-24 12:23

>>80
no, srsyl, i cant understand, what's wrong with that patch..

Name: !hT7zRmFpyY 2009-02-24 12:52

>>81
Wrong version of RainbowCrack?

Not that it's at all hard to patch it by hand. It's nothing but adding a function and inserting it into the list of available hashes. If you're even intending to run this sort of thing in the first place, you also probably want to use a much better tripcode algorithm anyway, which also doesn't waste CPU cycles doing HTML conversions. Theoretically, when building a table of all printable characters, the code will eventually produce the same escape sequences, and by not encoding them explicitly, you also allow for alternative renderings for other boards that don't encode those characters.

Retrospectively speaking, posting it on a pastebin would probably have been a good idea too. For instance:
+            case ',': strcat(pw, "," ); p += 5; break;
That's practically guaranteed to break in the stupidest way possible. Apparently shitchan encodes some &-escapes... but not all of them. Always nice to have a programming board that hopelessly mangles code.

Name: CaCtUs2003 !!UtfJrihbhRYclYF 2009-02-25 17:51

Secure Tripcode ftw!

Name: Anonymous 2009-02-26 10:41

>>83
Faggot.

Name: Anonymous 2009-02-26 11:05

>>83
The point of tripcode searchers isn't primarily to crack your shitty tripcode. It's to find interesting novelty tripcodes.

Name: Anonymous 2009-02-26 12:30

my CS teacher said multiple returns in a switch statement is bad programming practice.

Name: Anonymous 2009-02-26 12:51

>>86
Anonymous on /prog/ said your CS teacher is a bad programmer.

Name: Anonymous 2009-02-26 13:10

>>86
My CS teacher didn't know you can do a While True loop (problem: infer the language from the code snippet).

Name: Anonymous 2009-02-26 13:35

>>88
Looks like Haskell to me.  I don't know how to do a data WhileLoop = While Bool loop though.

Name: Anonymous 2009-02-26 13:45

>>86
Anyone who talks about programming practice like that is usually a total retard when it comes to actually programming in the real world. They're the kind of people who have huge 20000 line classes that take years to run, whereas a elite c coder will be returning all over the place and his code will run in seconds

Name: Anonymous 2009-02-26 14:12

>>90
Anyone who overgeneralizes will miss the point that the code in this particular case is actually shitty, and it'd be much more efficient to use a lookup table instead. >>86's CS teacher has a point.

Name: Anonymous 2009-02-26 14:36

>>91
a lookup table
I take it you've never looked at the compiler output for a switch statement, huh?

Name: Anonymous 2009-02-26 15:08

>>89
No, that's not Haskell. Hint: it's a fucking awful and Terrible! language that has a number at the end of its name.

Name: Anonymous 2009-02-26 16:23

>>93
Haskell 98?

Name: Anonymous 2009-02-26 18:11

>>92
I sure see a whole lot of mov and jmp for a flat lookup table. Try actually compiling the code and looking at the output before you talk shit.

Name: Anonymous 2009-02-26 22:58

>>86
multiple returns in a function is bad programming practice in general

this is true with gotos, breaks and continues too.

Name: Anonymous 2009-02-26 23:04

Haskell 98?

That's what she said.

Name: Anonymous 2009-02-26 23:55

>>97
Randall???

Name: Anonymous 2009-03-15 3:18

I AM AN IDIOT AND I KNOW THAT
NOW TELL ME WHAT TO DO WITH IT

Name: Anonymous 2009-03-15 7:32

>>99
1. Learn how to use development tools, such as patch, make, and ed.
2. Apply knowledge gained from #1.

Also 100GET

Name: !3.pSICPcdY 2009-03-15 9:52

SICPGET

Name: Anonymous 2009-03-15 17:11

protip: over a year ago i applied the patch and had a machine work for a week to generate the tables.  the patch does not work.

Name: Trollbot9000 2009-07-01 9:23


That happens to have a word with  it instantly It.

Name: Anonymous 2010-04-05 21:16

whats the point of tripcodes?
I've been here two years and never understood them.
what gives??

Name: Anonymous 2010-04-05 21:16

whats the point of tripcodes?
I've been here two years and never understood them.
what gives??

Name: Anonymous 2010-04-06 2:58

>>104
Authentication.

>>105
Authentication.

Name: Anonymous 2010-04-06 7:10

>>106
On an anonymous board. Nice!

Name: Anonymous 2010-04-06 8:48

>>88
>>93

C99?

Name: Anonymous 2010-04-06 9:26

>>107
It's not anonymous if you use a name.

Name: Anonymous 2010-04-06 9:31

diff -rubB rainbowcrack-1.2-src/src/HashAlgorithm.cpp rainbowcrack+tripcodes/src/HashAlgorithm.cpp
HashAlgorithm
Algor
Al gore

Name: !MhMRSATORI 2010-04-06 9:48

>>107
Loser.

Name: !!tripiFUXeuIgkdo 2010-07-08 6:45

>>15,83
lol "secure"

Name: !yhctCir6Vk 2010-07-08 7:00

asf

Name: !p51K5n7B7s 2010-07-08 7:00

asf

Name: Anonymous 2010-07-08 8:56

>>115-116
Moron.

Name: !GtN0Plfghk 2010-08-17 12:55

!!2yYIelz9OVV <---- crack this?

Name: Anonymous 2010-08-17 14:05

>>119
Moron.

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