Page 1 of 1 1
Topic Options
#164186 - 2006-07-11 10:08 AM License Code sample
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Hi there everyone,

I'm looking for some sample code to use some sort of license to enable/disable parts of code i wrote. For example, i wrote an inventory tool which contains user/machine tabs but also a history & started apps tab. I would like to default enable the first two tabs but time-bomb or disable the last two.

WWWWWWWW-XXXXXXXX-YYYYYYYY-ZZZZZZZZ meaning DDMMYYY or enable/disable (4 times, for each tab) could do that. Of course, the data should be encrypted and stored somewhere in a way that for users it is difficult to reverse engineer the real data.

Does someone has an idea?
_________________________
Kind regards,

Top
#164187 - 2006-07-11 11:55 AM Re: License Code sample
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
the simplest thing I can see to do is to make a reg value somewhere that is unlikely to be found... Like somewhere in HKEY_CLASSES_ROOT\CLSID\ and just write a key that incr on each use
of course that could be regsnapped, but that is few and far between.

are you going to crypt the code so the app itself isn't decompiled... that is the most likely avenue
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#164188 - 2006-07-11 12:51 PM Re: License Code sample
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I was thinking of some Rot13/Base64 combination of decryption code. So: kiX32 code, Rot13 over it and than Base64. Or does anybody has an idea how to implement such feature?

Maybe tokenizing could be used for the app itself...
_________________________
Kind regards,

Top
#164189 - 2006-07-11 09:49 PM Re: License Code sample
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
If you tokenize the code, you could encode the license info in an obscure reg key as Rad suggests. I posted a code/decode UDF a while back that would work for you. It should sufficiently obfuscate any registry entry you make. You can even use part of the timestamp of the file for a key value for the encoding. This way, if anyone manipulates the file, it will not decode the key properly.

Look at the CODEC UDF

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#164190 - 2006-07-12 05:49 AM Re: License Code sample
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Even better would be to use KiXcrypt or ASE to encrypt the complete package that would consist of a license script and the main script. The license script fires off first, sets a variable in the main script to the appropriate value via READLINE/WRITELINE to enable/disable features, then tokenizes the main script. Thus, the license itself is now embedded inside the tokenized script.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 837 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.125 seconds in which 0.103 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org