PDA

View Full Version : When use "vendor defined encryption routines", how to set daemon related part?


bridgeic
January 19th, 2015, 02:59
When use "vendor defined encryption routines"ˆreference article below, how to set daemon related part (I mean make the daemon file has the encryption routines also)? Which file should be modified?

http://www.woodmann.com/crackz/Tutorials/Amante1.htm

I try settings below, can be compiled, but the result seems not right.

i86_n3\makefile
blenderd.exe : lmrand1.exe lsvendor.obj lmappfil.obj
$(LD) $(LFLAGS) /out:$*.exe lsvendor.obj lm_new.obj lmappfil.obj \
$(DAEMON_LIBS) $(CLIBS)

machind\lmappfil.c

#include <lmclient.h>
#include "lm_code.h"
#include "lm_attr.h"

char *my_crypt(LM_HANDLE *, CONFIG *, char *, VENDORCODE *); // prototype for my encryption function

/* My vendor defined encryption routine */
char *my_crypt(LM_HANDLE *job, CONFIG *conf, char *sdate, VENDORCODE *key)
{
char *lic_key;
char *modify_key(char *); // prototype

lc_set_attr(job, LM_A_USER_CRYPT, (LM_A_VAL_TYPE)0);
lic_key = lc_crypt(job, conf, sdate, key); // This is the normal way to get the license key
lc_set_attr(job, LM_A_USER_CRYPT,(LM_A_VAL_TYPE)my_crypt);

/* modify the license-key */

return(modify_key(lic_key));
}

char *modify_key(char *key)
{
return ("123456789123"; // just return a constant string
// This function could contain a really complicated algorithm
// to change the normal license key in some way
// but who cares.
}