Skip to content

Commit

Permalink
Added TGCOnlineFree source code and included certificates for any DBP…
Browse files Browse the repository at this point in the history
… plug-ins you may already own
  • Loading branch information
LeeBamberTGC committed Feb 12, 2016
1 parent 4d5c8bf commit 210254b
Show file tree
Hide file tree
Showing 59 changed files with 9,450 additions and 14 deletions.
926 changes: 926 additions & 0 deletions Dark Basic Public Shared/CertificateKey.cpp

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions Dark Basic Public Shared/CertificateKey.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
//
// Hardware Key Header
//

// Include
#define _CRT_SECURE_NO_DEPRECATE
#pragma warning(disable : 4996)
#include "windows.h"
#include "direct.h"
#include "io.h"

// redundant LIB, now a DLL
//#include "md5.h"
//#include "MD5\MD5Checksum.h"

// Defines
#define InternalProductListQTY 20
#define InternalProductListMax InternalProductListQTY*3

// Externals
extern char g_pHardwareHashString [ 256 ];
extern LPSTR g_pProductList[];
extern LPSTR g_pProductDescList[];
extern LPSTR g_pProductIcon[];
extern LPSTR g_pProductIconLink[];
extern LPSTR g_pProductDLLNames[];
extern DWORD g_pProductCodes[];

// DLL global calls
typedef char* ( *TMD5ChecksumGetMD5 ) ( BYTE*, UINT );
typedef void ( *TMD5ChecksumFreeMD5 ) ( char* );
extern TMD5ChecksumGetMD5 gCMD5ChecksumGetMD5;
extern TMD5ChecksumFreeMD5 gCMD5ChecksumFreeMD5;
extern void InitMD5DLL ( void );
extern void FreeMD5DLL ( void );

// Internal Functions
bool WriteToRegistry(char* PerfmonNamesKey, char* key, LPSTR Datavalue);
int GetCurrentDay ( void );

// Functions for HWKEY handling
void GenerateHWKey ( void );
void ReadLocalHWKey ( void );

// Functions for TGCOnline
int FindProductName ( LPSTR pResponseCertificate );
int FindIndexOfPluginByDLLName ( LPSTR pDLLName );
LPSTR GenerateCertificateForProduct ( int iIndex );
LPSTR BuildProductKey ( int iIndex );
LPSTR GenerateInstalledProducts ( LPSTR pYourInstalled, LPSTR pValidFor, LPSTR pDays, LPSTR pValidCert, LPSTR pExpiredCert, LPSTR pDBProNotActivated );
LPSTR GenerateMangledDate ( int iDay );

// Functions for TGCProtectedApp
int AmIActive ( int iProductIndex, LPSTR pDaysLeft );
LPSTR GetHWKey ( void );

Loading

0 comments on commit 210254b

Please sign in to comment.