Hello, I've been working on a security based software from which I got the idea from another program. Here are the details:

Upon load of the software a 4 digit string is given (I.E: 1kfh). Then you're prompt for a password. To find your password you would use a Memory Editor (TSearch, Artmoney, etc) and search the 3 digits given to you. Out of all the thousands results given, you are to find your password. (obviously, very hard which is the point).

This is where I'm at in my program to do the same thing:
I give user a random string (they see 6 characters; the full string contains 12). They have to search the 6 characters using a ME. The correct password will be the remaining 6 characters will they will locate.

This is my problem:
When my code searches for the remaining code it comes back in UNICODE. I convert to text using wchar_t MyString = _T. After doing so, it still does not work. I think the search part is wrong, or I'm just REALLY bad at converting lol (which I sure I am).

My Question:
I'm familiar with ArtMoney so I don't know if other memory editors are the same. I'll set up an example to make the question make some sense (otherwise everything is very confusing).

Fun.exe gives me a random 3 characters out of 12. (Lets say it gives me, "The")
Full random string = TheFunString. (I dont know this)
Manualy, I search Fun.exe using ArtMoney, "The", there are 7 accurances. I locate the correct one and find the remaning 9 characters.
I enter the remaining characters in the Password box.

How can I search the full string in the program to to compare userinput with the correct value?

Hope this makes sense.. Thanks for any help IA.

13 Years
Discussion Span
Last Post by oboler

Sorry for double post, but I could not find the edit button. Anyways, I fixed the search so I do not need help with the question above anymore. I do have a new question which has come up.

char * Serial = (char*)(LPCTSTR)PreSerial;
		if (strlen(Serial) > 5) Serial[5] = 0;
//		PreSerial = (CString)Serial;
		char * Input = (char*)(LPCTSTR)m_Password;
		if (Serial == Input) m_Warning.SetWindowText("Correct");
		else m_Warning.SetWindowText(PreSerial);

Some reason whether I compare CString or Char* it always returns to the else statement. My question is, how do I compare the strings so the IF Else statement will work properly.

Other ways I have tried:

if (m_Password.Compare(PreSerial) == 0) //correct
else // invalid

Again it would always return invalid.

I have also tried char * MyVar = (char*)MyCstring.GetString() but that is the same as LPCTSTR.


Hey, I figured out the problem. I forgot to add:

		CString Password = int pID;

Your post helped me with another problem I was having though. Thanks for the help.


You defined Input and Serial as char *. You need to you strcmp to compare.

Don't ignore this advice. The sytax bugs are easy to fix as they usually stop it compiling. The Symantic bugs like this (you are comparing if two memory addresses are equal rather than if the strings are the same!) are a lot harder to catch. The program will compile but it will do strange things.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.