static void * video_thread_function(void * arg) { THREAD_CONTEXT * c = (THREAD_CONTEXT *)arg; if (! c_init_video()) { c_reboot(); return NULL; } while (! c->exit) { c->tick = get_tickcount(); c_do_video_handler(); } c_deinit_video(); printf("video quited\n"); c->quited = true; return NULL; }
int main(int argc, char *argv[]) { #define BUFSIZE 8192 int quit=0, i, counts[8], bp; char c, buffer[BUFSIZE+1024], result[14], salt[3], word[9]; char search[1024]; strcpy(search,argv[1]); printf(" [%s]\n", search); srand(get_tickcount()); memset(buffer,0,1024); /* I haven't throughly checked whether all these characters are valid in a tripcode as yet. */ char table[]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789 .!:#/`()_$[]+*{-"; bp = 0; salt[2] = 0; for (i=0; i<8; i++) { counts[i] = -1; word[i] = table[rand()%52]; } counts[0] = 0; word[0] = table[0]; while (!quit) { salt[0] = word[1]; salt[1] = word[2]; our_fcrypt (word, salt, result); for (i = 0; (word[i] != 0) && (i < 8); i++) buffer[bp++] = word[i]; buffer[bp++] = ' '; for (i = 3; i < 13; i++) buffer[bp++] = result[i]; buffer[bp++] = 0; if ((bp > BUFSIZE)) { if(strcasestr(buffer,search)) { printf("%s\n",buffer); memset(buffer,0,1024); } bp = 0; } i = 0; check: counts[i]++; c = table[counts[i]]; word[i] = c; if (c == 0) { counts[i] = 0; word[i] = table[0]; i++; if (i < 8) goto check; quit = 1; } } return 0; }