diff -urpN magnum-jumbo/src/cuda/mscash.cu magnum-jumbo_mscash-cuda_fix//src/cuda/mscash.cu --- magnum-jumbo/src/cuda/mscash.cu 2012-08-06 01:08:28.745433261 +0000 +++ magnum-jumbo_mscash-cuda_fix//src/cuda/mscash.cu 2012-08-06 01:04:48.658683400 +0000 @@ -1,6 +1,6 @@ /* -* This software is Copyright (c) 2011 Lukas Odzioba -* +* This software is Copyright (c) 2011,2012 Lukas Odzioba +* * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without modification, are permitted. * Based on Alain Espinosa implementation http://openwall.info/wiki/john/MSCash @@ -10,33 +10,9 @@ #include "../cuda_mscash.h" #include "cuda_common.cuh" -/* -static void HandleError(cudaError_t err, const char *file, int line) -{ - if (err != cudaSuccess) { - printf("%s in %s at line %d\n", cudaGetErrorString(err), file, - line); - exit(EXIT_FAILURE); - } -} - -#define HANDLE_ERROR(err) (HandleError(err,__FILE__,__LINE__)) -*/ -//extern "C" void mscash_init(int gpuid); extern "C" void cuda_mscash(mscash_password *, mscash_hash *, mscash_salt *); __constant__ mscash_salt cuda_salt[1]; -/*__host__ void mscash_init(int gpuid) -{ - int count; - HANDLE_ERROR(cudaGetDeviceCount(&count)); - if (gpuid < count) - cudaSetDevice(gpuid); - else { - printf("Invalid CUDA device id = %d\n", gpuid); - exit(1); - } -}*/ __device__ static void md4_crypt(uint32_t * output, uint32_t * nt_buffer) diff -urpN magnum-jumbo/src/cuda_mscash.h magnum-jumbo_mscash-cuda_fix//src/cuda_mscash.h --- magnum-jumbo/src/cuda_mscash.h 2012-08-06 01:08:28.746433134 +0000 +++ magnum-jumbo_mscash-cuda_fix//src/cuda_mscash.h 2012-08-06 01:04:53.179433749 +0000 @@ -1,6 +1,6 @@ /* -* This software is Copyright (c) 2011 Lukas Odzioba -* +* This software is Copyright (c) 2011,2012 Lukas Odzioba +* * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without modification, are permitted. * Based on Alain Espinosa implementation http://openwall.info/wiki/john/MSCash diff -urpN magnum-jumbo/src/cuda_mscash_fmt.c magnum-jumbo_mscash-cuda_fix//src/cuda_mscash_fmt.c --- magnum-jumbo/src/cuda_mscash_fmt.c 2012-08-06 01:08:28.746433134 +0000 +++ magnum-jumbo_mscash-cuda_fix//src/cuda_mscash_fmt.c 2012-08-06 01:04:22.207683387 +0000 @@ -1,6 +1,6 @@ /* -* This software is Copyright (c) 2011 Lukas Odzioba -* +* This software is Copyright (c) 2011,2012 Lukas Odzioba +* * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without modification, are permitted. * Based on Alain Espinosa implementation http://openwall.info/wiki/john/MSCash @@ -27,6 +27,28 @@ static mscash_salt currentsalt; static struct fmt_tests tests[] = { {"M$administrator#25fd08fa89795ed54207e6e8442a6ca0", "password"}, + {"M$usry#40085cd242c04048c8077e09272101a2","sppooky"}, + {"M$nineteen_characters#383a214ed244be627aca298b8b886736","12qw3´eň"}, + {"M$lexi Conrad#2fbc399b9ff4fbeb36672e89a6deadbd","gobble"}, + {"M$1#bccae02e029dd8751efb9bc0d5818efb","summer"}, + {"M$seven17characters#3a312e705f18dee063065a5cbb188ced","qwerty"}, + {"M$ninechars#acc3dac5ba437462e08e90e0496d63fb","late*night"}, + {"M$Herman#1c799f1ffc87b3552984e562b8f2fe82","jamestkirk__17"}, + {"M$skippy#186fe89fe5a837421c9385c553093950","X-files__17"}, + {"M$sevench#40f8287724beb48af509f3797406a61a","boneheadded__17"}, + {"M$elev__chars#d19ad42b24057cf786105302ed2334aa","justmysize__17"}, + {"M$seven17characters#3860cf86f3bff14fb416a95836358cbc","outleft__17"}, + {"M$eight18_characters#bce33b848b896368ba1f02d75cd1b708","hhello__17"}, + {"M$ninechars#ac986612d8b63dc8134439e85ce29b46","enterNow__17"}, + {"M$nineteen_characters#887a9b462ce2cdfe36f5acd3f3b7d3f5","IwasJu$there__17"}, + {"M$ripper#0954c02e5dc5c80ce9585814a93695e0","DOGBERT__17"}, + {"M$sevench#a95d766094b33dd467d372724379965c","fukOFF__17"}, + {"M$John#b835fd341ff077bbdeb7ea2f54e610e5","develsdue__17"}, + {"M$elev__chars#b9af6edaadd46d53891a3237ee7c7f17","bartlby__17"}, + {"M$elev__chars#8dbb206b5a3e443d22d2b8cba6e1ebea","characters__17"}, + {"M$ninechars#b68f7521627f93e0dd8854f264e59f52","good to KN0W__17"}, + {"M$a#7b02101fc62ee29847d602187fc6292c","1__18"}, + {"M$teN__chars#815bc098d30d2a9ba5b612ffe4a0ed0a","inkjet__17"}, {NULL} }; @@ -109,12 +131,14 @@ static void *salt(char *ciphertext) { static mscash_salt salt; char *pos = ciphertext + strlen(mscash_prefix); - int length = 0; + int i,length = 0; while (*pos != '#'){ if(length == SALT_LENGTH) return NULL; salt.salt[length++] = *pos++; } salt.length = length; + for(i=0;i