View Single Post
  #1  
Old 01-20-2015, 13:56
bridgeic bridgeic is offline
Friend
 
Join Date: Jun 2012
Posts: 88
Rept. Given: 7
Rept. Rcvd 3 Times in 3 Posts
Thanks Given: 0
Thanks Rcvd at 7 Times in 6 Posts
bridgeic Reputation: 3
Arrow When use "vendor defined encryption routines", how to set daemon related part?

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 when use the generated daemon 'blendered' to start license below, it reports error below, any friend can give some suggestion?

Invalid license key (inconsistent encryption code for "f1"

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 <stdio.h>
#if (defined( __STDC__) || defined(_WINDOWS)) && !defined(apollo)
#include <stdlib.h>
#endif
#include <time.h>
#include "lmclient.h"
#include "lm_code.h"
#include "lm_attr.h"
/* LM_CODE(site_code, ENCRYPTION_SEED1, ENCRYPTION_SEED2, VENDOR_KEY1, */
/* VENDOR_KEY2, VENDOR_KEY3, VENDOR_KEY4, VENDOR_KEY5); */

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

lc_set_attr(lm_job, LM_A_USER_CRYPT, (LM_A_VAL_TYPE)0);
lic_key = lc_crypt(lm_job, conf, sdate, key); // This is the normal way to get the license key
lc_set_attr(lm_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.
}

machind\lsvendor.c

/* Vendor encryption routine */
extern char *my_crypt(LM_HANDLE *, CONFIG *, char *, VENDORCODE *); // prototype for my encryption function
char *(*ls_user_crypt)() = my_crypt;
Reply With Quote