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

Tripcode testing thread

Name: Anonymous 2007-08-30 5:50 ID:SUIBJgzE

ITT I will perform some saged experiments with tripcodes.

Name: Anonymous 2008-01-02 8:09

>>323
So you're going to try and guess the algorithm?
I'm already done.  I started this thread, you see.
Make it handle the replacements then you whining fuck.
I think this is mostly correct.
void shiichan_salt(unsigned char* const in, unsigned char* const salt)
{
        unsigned int i = 0;
        const char saltchars[] = ":;<=>?@\\]^_`ABCDEFGabcdef";
        for (i = 0; i < 8; ++i) {
                switch (in[i]) {
                        case '&':   strncpy((char*)in + i, "&amp;",  5); break;
                        case '"':   strncpy((char*)in + i, "&quot;", 6); break;
                        case '\'':  strncpy((char*)in + i, "'", 6); break;
                        case '<':   strncpy((char*)in + i, "&lt;",   4); break;
                        case '>':   strncpy((char*)in + i, "&gt;",   4); break;
                        case '\x1': strncpy((char*)in + i, "&lt;",   4); break;
                        case '\x2': strncpy((char*)in + i, "&gt;",   4); break;
                        case '\x3': strncpy((char*)in + i, "&quot;", 6); break;
                }
        }
        strncpy((char*)salt, (char*)in + 1, 2);
        if (strlen((char*)in) == 2) salt[1] = 'H';
        else if (strlen((char*)in) < 2){
                salt[0] = strlen((char*)in) ? 'H' : '.';
                salt[1] = '.';
        }
        for (i = 0; i < 13; ++i) {
                if (salt[0] == saltchars[i]) salt[0] = saltchars[i + 13];
                if (salt[1] == saltchars[i]) salt[1] = saltchars[i + 13];
        }
        if (salt[0] < '0' || salt[0] > 'z') salt[0] = '.';
        if (salt[1] < '0' || salt[1] > 'z') salt[1] = '.';
}

Newer Posts