Skip to content

Commit 482547c

Browse files
committed
Update CrackMe02
1 parent d624043 commit 482547c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CrackMe02/CrackMe/MainForm.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ namespace CrackMe {
1313
//To convert System::String* to std::char*
1414
using namespace System::Runtime::InteropServices;
1515

16+
// Define a key seed
17+
char* seed = "emkcarcolleh";
18+
1619
/// <summary>
1720
/// CrackMe with modern GUI
1821
/// </summary>
@@ -239,9 +242,7 @@ private: System::Void buttonActivate_Click(System::Object^ sender, System::Even
239242
// Write a code to evaluate user's input here.
240243
// This example simply compares user input and plain text.
241244

242-
243-
// Define a key seed
244-
char* key = "emkcarcolleh";
245+
char key[100];
245246
// Code below reverse the character order of key seed
246247
// The correct password is "hellocrackme"
247248

@@ -251,8 +252,11 @@ private: System::Void buttonActivate_Click(System::Object^ sender, System::Even
251252
// Convert System::String to Char
252253
char* input_key = (char*)(void*)Marshal::StringToHGlobalAnsi(input_key_s);
253254

255+
256+
254257
//Using temp to store the char value at index i so
255258
//you can swap it in later for char value at index n
259+
strcpy(key, seed);
256260
int len = strlen(key);
257261
int n = len - 1;
258262
for (int i = 0; i < (len / 2); i++) {

CrackMe02/Release/CrackMe.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)