Click here to Skip to main content
15,890,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Video output gets corrupted. Displays Grey colour instaed of actual Video colours.? Pin
dusty_dex20-May-13 2:47
dusty_dex20-May-13 2:47 
QuestionWhat exactly is “External Dependencies” as used in MFC DLL wizard? Pin
Vaclav_19-May-13 7:30
Vaclav_19-May-13 7:30 
AnswerRe: What exactly is “External Dependencies” as used in MFC DLL wizard? Pin
«_Superman_»19-May-13 15:57
professional«_Superman_»19-May-13 15:57 
GeneralRe: What exactly is “External Dependencies” as used in MFC DLL wizard? Pin
Vaclav_21-May-13 6:02
Vaclav_21-May-13 6:02 
QuestionIMPLEMENT_RUNTIMECLASS_T Pin
john563218-May-13 21:38
john563218-May-13 21:38 
GeneralRe: IMPLEMENT_RUNTIMECLASS_T Pin
Richard MacCutchan19-May-13 1:19
mveRichard MacCutchan19-May-13 1:19 
QuestionButton Ownerdraw - Transparency Issue Pin
Jijo.Raj18-May-13 17:16
Jijo.Raj18-May-13 17:16 
Questiongenerate password using brute algo? Pin
Le@rner17-May-13 20:34
Le@rner17-May-13 20:34 
hi all,

I am using

static /*const*/ char alphabet[] =
        "abcdefghijklmnopqrstuvwxyz"
        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        "0123456789";


static /*const*/ int alphabet_size = sizeof(alphabet) - 1;

CString str_val=_T("");
void brute_impl(char * str, int index, int max_depth)
{
    int i;
    for (i = 0; i < alphabet_size; ++i)
    {
        str[index] = alphabet[i];

        if (index == max_depth - 1)
        {			
			str_val.Format("%s", str);

			//check the password here

        }
        else
        {
            brute_impl(str, index + 1, max_depth);
        }
    }
}

void brute_sequential(int max_len)
{
    char * buf = new char[max_len + 1];

	//buf = malloc(max_len + 1);
	    int i=0;

	while(buf[i] != NULL)
	{
		if(i==max_len+1)
			break;

		buf[i]='\0';

		i++;
	}

	CString str=_T("");
	str.Format("size of array is %d\n", i);


    for (i = 1; i <= max_len; ++i)
    {
        memset(buf, 0, max_len + 1);
        brute_impl(buf, 0, i);
    }

    free(buf);
}


but its time consuming and very slow

anybody have more efficient and fast method for this.

thanks.
AnswerRe: generate password using brute algo? Pin
MicroVirus18-May-13 12:58
MicroVirus18-May-13 12:58 
Questionglut.h header package doesnt work Pin
Yashwanth. C.b17-May-13 19:01
Yashwanth. C.b17-May-13 19:01 
AnswerRe: glut.h header package doesnt work Pin
Newbie0017-May-13 22:28
Newbie0017-May-13 22:28 
QuestionHow to Conect two computers in different networks Pin
AntonioJesus17-May-13 0:48
professionalAntonioJesus17-May-13 0:48 
AnswerRe: How to Conect two computers in different networks Pin
Richard MacCutchan17-May-13 1:01
mveRichard MacCutchan17-May-13 1:01 
AnswerRe: How to Conect two computers in different networks Pin
Garth J Lancaster17-May-13 1:03
professionalGarth J Lancaster17-May-13 1:03 
GeneralRe: How to Conect two computers in different networks Pin
AntonioJesus17-May-13 1:18
professionalAntonioJesus17-May-13 1:18 
AnswerRe: How to Conect two computers in different networks Pin
Jochen Arndt17-May-13 2:24
professionalJochen Arndt17-May-13 2:24 
AnswerRe: How to Conect two computers in different networks Pin
David Crow17-May-13 5:06
David Crow17-May-13 5:06 
QuestionOOP Project Ideas Pin
dirtyfishtank16-May-13 19:30
dirtyfishtank16-May-13 19:30 
AnswerRe: OOP Project Ideas Pin
MicroVirus17-May-13 1:14
MicroVirus17-May-13 1:14 
GeneralRe: OOP Project Ideas Pin
dirtyfishtank23-May-13 12:45
dirtyfishtank23-May-13 12:45 
AnswerRe: OOP Project Ideas Pin
Erudite_Eric19-May-13 22:43
Erudite_Eric19-May-13 22:43 
QuestionWhy does this compile on Linux with gcc and not on WIndows with VC? Pin
Erudite_Eric16-May-13 7:45
Erudite_Eric16-May-13 7:45 
AnswerRe: Why does this compile on Linux with gcc and not on WIndows with VC? Pin
Chris Losinger16-May-13 7:56
professionalChris Losinger16-May-13 7:56 
GeneralRe: Why does this compile on Linux with gcc and not on WIndows with VC? Pin
Erudite_Eric16-May-13 8:06
Erudite_Eric16-May-13 8:06 
GeneralRe: Why does this compile on Linux with gcc and not on WIndows with VC? Pin
Erudite_Eric16-May-13 8:08
Erudite_Eric16-May-13 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.