1
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 (""") 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, """); p += 6; break;
+ case '\'':strcat(pw, "'" ); p += 5; break;
+ case '<': strcat(pw, "<" ); p += 4; break;
+ case '>': strcat(pw, ">" ); 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()
59
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.