/* mesgs.c MDcrack message system */ #include #include #include #include #ifdef NCURSES #include #endif #include "version.h" #define MSG_NUMBER 47 #ifndef NCURSES #define printw printf #endif void mdmesg(unsigned int, void *); #ifndef RESUME_FILE #define RESUME_FILE "/tmp/.mdcrack.resume" #endif char msgs[MSG_NUMBER][256]={\ "\n<> Did not succeed to crack your hash, sorry.\n",\ "\n<> A md5 digest must have 16 bytes length (32 ascii digits from 0 to F).\n\n",\ "\n<> No resume file found.\n\n",\ "\n<> Output file could not be created.\n\n",\ "\n<> Input file could not be open.\n\n",\ "\n<> \""RESUME_FILE"\" not found.\n\n",\ "\n<> Could not open input file.\n\n",\ "\n<> Unable to allocate enough memory.\n\n",\ "\n<> Problem while generating statistics.\n",\ "\n<> -W and -R are not compatible.\n\n",\ "\n<> Output file could not be created.\n\n",\ "\n<> Total password length can not exceed 56 chars.\n\n",\ "\n<> Session stopped in less than 10 ms,\n<> not enough for a statistical report.\n\n",\ "\n<> Hashes file format incompatibility (check the -F option).\n\n",\ "\n<> Output Hashes file \"%s\" is now closed.\n",\ "\n<> \""RESUME_FILE"\" is already a symlink\n<> no resume file created, operation too hazardous.\n",\ "\n<> \""RESUME_FILE"\" file exists ... resuming last session\n",\ "\n<> Previous resume file \""RESUME_FILE"\" deleted.\n",\ "\n<> Using custom charset : %s \n",\ "\n<> Using default charset : %s \n",\ "\n<> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n<> Disk test: write average speed (write %d MB) ... ",\ "\n<> Setting system disk cache to %d MB.\n",\ "\n<> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n<> Disk test: read average speed (with %d MB) ... ",\ "\n<> Fastmode is activated.",\ "\n<> Fastmode is disabled.",\ "\n<> Disabling system disk cache.",\ "\n<> File bufferization in %d MB sized block(s).",\ "\n<> Sorting custom charset ... ",\ "\n<> New charset created",\ "\n<> Session was killed in less than 10 ms,\n<> not enough for a statistical report.\n\n",\ "\n<> Session terminated -- ",\ "\n<> Invalid MD5 digest.\n\n",\ "\n<> Session interrupted by user.\n",\ "\n<> "NAME" v"RELEASE" is starting.",\ "\n<> Total password length (including randomizers) can not exceed 55 chars.\n\n",\ "Press a key\n",\ "<> Max pass size = 12 >> Entering MD5 Core 1.\n",\ "<> Max pass size = 28 >> Entering MD5 Core 2.\n",\ "<> Max pass size = 56 >> Entering MD5 Core 3.\n",\ "<> Max pass size = 56 (verbose mode) >> Entering MD5 Core 3.\n",\ "<> Max pass size = 12 >> Entering MD4 Core 1.\n",\ "<> Max pass size = 28 >> Entering MD4 Core 2.\n",\ "<> Max pass size = 56 >> Entering MD4 Core 3.\n",\ "<> Max pass size = 56 (verbose mode) >> Entering MD4 Core 3.\n",\ "<> Max pass size = 56 >> Entering NTLM1 Core.\n",\ "<> Max pass size = 56 (verbose mode) >> Entering NTLM1 Core.\n",\ "\n<> \""RESUME_FILE"\" permissions changed.\n",\ }; void mdmesg(number, arg) unsigned int number; void *arg; { char ident; if (number < MSG_NUMBER) { #ifdef NCURSES attrset(COLOR_PAIR(2)); ident=msgs[number][4]; switch(ident) { case 'a': attrset(COLOR_PAIR(4)); break; case 'e': attrset(COLOR_PAIR(4)); break; case 'y': attrset(COLOR_PAIR(2)); break; case 'r': attrset(COLOR_PAIR(3)); break; } #endif printw(msgs[number], arg); #ifdef NCURSES refresh(); #endif fflush(stdout); } #ifdef NCURSES attrset(COLOR_PAIR(1)); #endif }