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

Crack those tripcode!

Name: wootrshCIY !wootrshCIY 2007-05-12 6:53 ID:BTFLI2Nf

small code to find patterns in tripcodes


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <openssl/des.h>


int main(int argc, char **argv) {

        char charset[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        char temp[14];
        char pwd[9];
        size_t charsize;
        unsigned int i;
        if(argc != 2) {
                printf("usage: %s [pattern]\n", argv[0]);
                return 1;
        }
        srand(time(NULL));
        charsize = sizeof(charset);
        pwd[8] = 0;
        while(1) {
        for(i=0;i<8;i++)
                pwd[i] = charset[rand()%charsize];
        des_fcrypt(pwd, pwd+1, temp);
        if(strstr(temp+3, argv[1]))
                printf("%s %s \n", pwd, temp+3);
        }
        return 0;


}


compile with
gcc -o prog code.c -O3 -lcrypto

Name: cOcksnXo.. !cOcksnXo.. 2007-05-12 7:06 ID:BTFLI2Nf

And here's one to check if it matches regardless case.


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <openssl/des.h>


void strtolower(char *);

int main(int argc, char **argv) {

        char charset[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        char temp[14];
        char check[11];
        char pwd[9];
        size_t charsize;
        unsigned int i;
        if(argc != 2) {
                printf("usage: %s [pattern]\n", argv[0]);
                return 1;
        }
        srand(time(NULL));
        charsize = sizeof(charset);
        pwd[8] = 0;
        strtolower(argv[1]);
        while(1) {
        for(i=0;i<8;i++)
                pwd[i] = charset[rand()%charsize];
        des_fcrypt(pwd, pwd+1, temp);
        strcpy(check, temp+3);
        strtolower(check);
        if(strstr(check, argv[1]))
                printf("%s %s \n", pwd, temp+3);
        }
        return 0;


}

void strtolower(char *p) {
        while(*p) {
                *p = tolower(*p);
                p++;
        }
}


3oe0VPnu cOcksnXo..

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