Jump to content
Tuts 4 You

How to encrypt a string


alaphate

Recommended Posts

The application is a simply messagebox.

I can use WinHex to open the exe file, and search and replace "HelloWorld" string.

Is there a way to encrypt such string, so that I can not find "HelloWorld" ?

Source code:

#include <windows.h>

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {

MessageBox(NULL, "HelloWorld", "Title", MB_OK);

return 0;

}

Thanks for helping.

Link to comment

If you just want to stop a simple text string search then XOR encode each character with a fixed value when you store the character string and XOR decode again when you use it.

This will stop a casual text string search but won't stop any reasonably experienced cracker.

Ziggy

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...