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

cracking tripcod

Name: Anonymous !2bgybBZ7HI 2007-09-21 1:19 ID:0fUJYRhI

how the fuck??

If I has a string "foo" how do I get the tripcode for it?

Name: Anonymous 2007-09-21 11:50 ID:0fUJYRhI

>>26
ok so like
I tried it..... but its bullshit


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

void shiichan_salt(char* in, char* salt)
{
    unsigned int i = 0;
    char saltchars[] = ":;<=>?@\\]^_`ABCDEFGabcdef";
    for (i = 0; i < 8; ++i) {
        switch (in[i]) {
            case '&':   strncpy(in + i, "&amp;",  5); break;
            case '"':   strncpy(in + i, "&quot;", 6); break;
            case '\'':  strncpy(in + i, "'", 6); break;
            case '<':   strncpy(in + i, "&lt;",   4); break;
            case '>':   strncpy(in + i, "&gt;",   4); break;
            case '\x1': strncpy(in + i, "&lt;",   4); break;
            case '\x2': strncpy(in + i, "&gt;",   4); break;
        }
    }
    strncpy(salt, in + 1, 2);
    if (strlen(in) == 2) salt[1] = 'H';
    else if (strlen(in) < 2){
        salt[0] = strlen(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] = '.';
}

int main(void) {
  char salt[512];
  char * s = "foo";
 
 
  shiichan_salt(s, salt);
  puts(crypt(salt, s));
 
  return EXIT_SUCCESS;
}


this just prints crap.. not the right tripcode what am I doing wonr?

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