int main(int argc, char** argv) { omp_set_num_threads(THREADS); int threadNum=0; int threadWork = MAX_COMBO/THREADS; if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } char passguess[9]; char passmatch[9]; long currpass=0; int notfinished=1; int notfound=1; #pragma omp parallel private(threadNum) private(notfound) private(currpass) private(passguess) { threadNum=omp_get_thread_num(); currpass = threadNum*threadWork; while(notfinished && notfound && currpass < (threadNum+1)*threadWork) { genpass(currpass,passguess); notfound=test(argv[1], passguess); currpass++; } if(notfound == 0) { notfinished = 0; memcpy(passmatch,passguess,9); } } printf("found: %s\n",passmatch); return 0; }
int main(int argc, char** argv) { if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } int notfound=1; int limit = 100000000; int i = 0; char result[9]; #pragma omp parallel for for(i = 0; i < limit; i++) { char passmatch[9]; genpass(i,passmatch); if(!test(argv[1], passmatch)) { genpass(i, result); } } printf("found: %s\n",result); return 0; }
void operator () ( const tbb::blocked_range<long>& r ) const { char passmatch[9]; for ( int i=r.begin(); i<=r.end(); i++ ) { if ( *notfound != 0 ) { genpass( i, passmatch ); *notfound = test( passhash, passmatch ); if ( *notfound == 0 ) { printf( "THREAD %ld found: %s\n", pthread_self(), passmatch ); } } } }
int main(int argc, char** argv) { if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } char result[9]; long currpass=0; int notfound=1; int i = 0; int limit=100000000; cilk_for(i = 0; i < limit; i++) { char passmatch[9]; genpass(i,passmatch); // printf("%s\n",passmatch); if(!test(argv[1], passmatch)) { genpass(i,result); } } printf("found: %s\n",result); return 0; }
int main(int argc, char** argv) { if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } char passmatch[9]; long currpass=0; int notfound=1; while(notfound) { genpass(currpass,passmatch); notfound=test(argv[1], passmatch); currpass++; } printf("found: %s\n",passmatch); return 0; }
int main(int argc, char** argv) { if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } long currpass=0; char foundmatch[9]; cilk_for(; currpass<100000000; ++currpass){ char passmatch[9]; genpass(currpass,passmatch); if (test(argv[1], passmatch)==0){ strncpy(foundmatch, passmatch, 9); } } printf("found: %s\n",foundmatch); return 0; }
int main(int argc, char** argv) { if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } cilk_for(int i=0;i<100000000; i++){ char passmatch[9]; int notfound=1; genpass(i,passmatch); notfound=test(argv[1], passmatch); if(notfound==0){ printf("found: %s\n",passmatch); } } return 0; }
int main(int argc, char** argv) { if(argc != 2) { printf("Usage: %s <password hash>\n",argv[0]); return 1; } //char passmatch[9]; //long currpass=0; //int notfound=1; #pragma omp parallel for for(int i=0; i<100000000; i++) { char passmatch[9]; int notfound = 1; genpass(i,passmatch); notfound=test(argv[1], passmatch); if (notfound == 0) { printf("found: %s\n", passmatch); } //currpass++; //printf("%i\n", currpass); } //printf("found: %s\n",passmatch); return 0; }