Skip to content

Commit

Permalink
Finished Win32 GUI (First time in my life)
Browse files Browse the repository at this point in the history
  • Loading branch information
Endermanch committed Apr 11, 2023
1 parent 602ad90 commit 70e2c6f
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 54 deletions.
5 changes: 3 additions & 2 deletions Keygen.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
<AdditionalDependencies>lib\libcrypto.lib;comctl32.lib;uxtheme.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>lib\libcrypto.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
<GenerateDebugInformation>true</GenerateDebugInformation>
Expand All @@ -99,6 +99,7 @@
<ProgramDataBaseFile>$(OutDir)$(TargetName).pdb</ProgramDataBaseFile>
<SubSystem>Console</SubSystem>
<AdditionalManifestDependencies>"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"</AdditionalManifestDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
Expand Down Expand Up @@ -133,7 +134,7 @@
<ProxyFileName>%(Filename)_p.c</ProxyFileName>
</Midl>
<Link>
<AdditionalDependencies>lib\libcrypto.lib;comctl32.lib;uxtheme.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>lib\libcrypto.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
<GenerateDebugInformation>false</GenerateDebugInformation>
Expand Down
5 changes: 5 additions & 0 deletions header.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@
#define IDC_LABEL1 1055
#define IDC_LABEL2 1056
#define IDC_LABEL3 1057
#define IDC_LABEL4 1058
#define IDC_LABEL5 1059

typedef unsigned long ul32;

extern HANDLE hConsole;

extern ul32 dwSeed;
extern byte charset[];

extern const char pXP[];
Expand Down Expand Up @@ -128,6 +132,7 @@ void generateServerKey(
// utilities.cpp
void cprintf(const char *Format, int nColor, ...);
void endiannessConvert(byte *data, int length);
ul32 randomRange(ul32 dwLow, ul32 dwHigh);

EC_GROUP *initializeEllipticCurve(
const char *pSel,
Expand Down
7 changes: 3 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "header.h"

HANDLE hConsole;
ul32 dwSeed;
byte charset[] = "BCDFGHJKMPQRTVWXY2346789";

int mainServer() {
Expand Down Expand Up @@ -143,12 +144,12 @@ int main() {

hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

srand(GetTickCount64());

HINSTANCE hInstance = GetModuleHandleW(nullptr);

int p = InitializeWindow(hInstance);

SetConsoleTitleA("Windows XP VLK Keygen");

system("cls");
cprintf("Windows XP VLK Keygen\n\n", 0x08);

Expand All @@ -173,6 +174,4 @@ int main() {
printf("\t2. Hash = (First32Bits(SHA1(pRaw, r.x, r.y)) >> 4.\n");
printf("\t3. Signature = privateKey * Hash + (C %% Order)\n");
printf("Finally, we pack these components together, convert them to Base24 and get a valid Windows XP key.\n");

cprintf("Input Raw Product Key BBB-CCCCCC WITHOUT DASHES in range [100-000000; 999-999999]: ", 0x0E);
}
10 changes: 9 additions & 1 deletion utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "header.h"

/* Colored output */
/* Colored output. */
void cprintf(const char *Format, int nColor, ...) {
va_list vList;

Expand All @@ -26,6 +26,7 @@ void endiannessConvert(byte *data, int length) {
}
}

/* Initializes the elliptic curve. */
EC_GROUP *initializeEllipticCurve(
const char *pSel,
long aSel,
Expand Down Expand Up @@ -65,6 +66,8 @@ EC_GROUP *initializeEllipticCurve(
// Context variable
context = BN_CTX_new();



/* Public data */
BN_hex2bn(&p, pSel);
BN_set_word(a, aSel);
Expand Down Expand Up @@ -96,4 +99,9 @@ EC_GROUP *initializeEllipticCurve(
BN_CTX_free(context);

return eCurve;
}

/* Generates a random 32-bit integer in range. */
ul32 randomRange(ul32 dwLow, ul32 dwHigh) {
return rand() % (dwHigh - dwLow) + dwLow;
}
Loading

0 comments on commit 70e2c6f

Please sign in to comment.