Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

SW copy protection


  • Please log in to reply
305 replies to this topic
David55
  • Guests
  • Last active:
  • Joined: --
:-) i try to eplain it again:

i use in my small script your first code.

now, if my firends want to use it, he give me his pc fingerprint and i generate a key (wit your key generator you have made) so they can use it only on one computer,

if his friends want also to have the program, i need again to generate new keys for there pc fingerprint.

so, if i do not change all the keys, anyone can use your script and generate keys for himself...am i right??

again, i use your first 2 scripts...one is implemented in my script...the other one is compiled as a key generator for the unique pc finger print...

i hope that may help to understand my first question and to help me.

David55
  • Guests
  • Last active:
  • Joined: --
just to avoid confusion - with keys to generate i means SWsafe.ini file...
so with your key generator i generate ini file for any pc fingerprint.

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

just to avoid confusion - with keys to generate i means SWsafe.ini file...
so with your key generator i generate ini file for any pc fingerprint.


did you not try out my post a few posts back then?

David55
  • Guests
  • Last active:
  • Joined: --
tic: i did not figur out how your script works... sorry. therefore, i still using
Laszlo first code in the script (with the generator thats make SWsafe.ini for any new pc fingerprint).

but again, can someone help me with my first questions??

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007

tic: i did not figur out how your script works... sorry. therefore, i still using


what do you mean? just copy my code into a blank ahk file (create a text document and change the extension to .ahk) and then run it. it will come up with 3 boxes. 1 for your name, 1 for your email and 1 with all the variables Laszlo had previosuly stated. click encrypt and it will perform XTEA on all of those variables, then just as a tester, click write... and it will create a txt document called hash.txt in the same folder you are running the ahk from. if you wish to decrypt this then copy its contents back into that field (over anything in it) and then click decrypt.

You should change the values of K1-5 so that it cannot be decrypted by anyone else.


@Laszlo:

As you previously had shown earlier how to include C functions in your ahk as dllcalls, could you recommend some CPUID info that would be good to include (for the purpose i had shown) thanks..

David55
  • Guests
  • Last active:
  • Joined: --
maybe I'm stupid :oops: i'm not using ahk for long time..

i understand that i have 2 scripts:

SWProtect-Internal.ahk

GUI Library - SWProtect-GUI.ahk

which one should be put in my script?

how can i generate uniqe (key ini) for any pc fingerprint?

Icarus
  • Members
  • 851 posts
  • Last active: Jan 02 2012 11:17 AM
  • Joined: 24 Nov 2005
David,

Lets put some order into things.
The Internal library is designed to easily provide you with simple API functions to generate anything you want - keys, finger prints etc.

To test it, you may create a new AHK file, and copy this code for a demonstration:

Internal Library Demo
#Include SWProtect-Internal.ahk

; Initialize the secret seeds
SWP_Initialize()	; with optional 8 secret seeds

; Get my fingerprint
Fingerprint := SWP_GetPcFingerprint()
msgbox This is my fingerprint`n%Fingerprint%

; Generate a key for me
Key         := SWP_GenerateKey( "Icarus", "[email protected]", Fingerprint )
msgbox I got a key`n%Key%

; Test if user details are valid
UserOK      := SWP_IsUserAuthenticated( "Icarus", "[email protected]", Key )
If( UserOk )
	msgbox Yes, user is cool, we can go on and show our app
Else
	msgbox No, this user is not allowed to use our software, we will exit

Now the GUI, is an optional implementation that I made to make it easy to just plug-n-play software protection without the need to do anything.

GUI Library Demo
; Auto execute part goes here
Gosub Main

Return
#Include SWProtect-Internal.ahk
#Include SWProtect-GUI.ahk


Main:
	; Initialize the secret seeds
	SWP_Initialize()	; with optional 8 secret seeds
	
	; Put this anywhere in the beginning of your program, it will
	; check if the user is authorized (by looking for the Reg.ini file) and if
	; not, we will ask him to register or enter key.
	; 
	; The syntax is SWP_CheckRegistration( "AppName", "DeveloperEmail" )
	SWP_CheckRegistration( "Test Program", "[email protected]" )
	
	; The program continues here - we will not reach this section unless
	; the user entered a valid registration
	Msgbox This user is ok, we can continue and play
Return


One last usage demo, is the KeyGen

Keygen Demo
; Autoexecute section here
Gosub RunKeygen

Return

#Include SWProtect-Internal.ahk
#Include SWProtect-GUI.ahk

RunKeygen:
	Clipboard := SWP_GetPcFingerprint()	; To have my own fingerprint (optional)
	SWP_Initialize()					; Up to 8 secret keys, 
	SWP_ShowKeyGen()
	
	; Use this code to generate a key for a user of your software, after you 
	; have his fingerprint
Return



I hope this clarifies the use of these libraries.

David55
  • Guests
  • Last active:
  • Joined: --
If i try the keygen demo i get:

error at line 302

line text "reg.ini"

thanks anyway..

Leon
  • Members
  • 179 posts
  • Last active: May 22 2008 02:41 PM
  • Joined: 27 Aug 2007
I'm studying this script mostly for educational value.
As far as i can tell, none of these options were used in the script, am I correct?

In addition one can use disk volume identifiers by running the consol command VOL > info.txt:

Volume in drive C has no label.
Volume Serial Number is 24B5-2345

The MAC (Media Access Controller) address of the network cards can be used, too, by Getmac /NH >> info.txt:

00-20-30-F0-F1-F2 Media disconnected


(To be safe only the first 17 characters should be used, the MAC of the first network card.)

Instead of saving this data in a temporary file, one can use CMDret - return output from console programs [DLL version]



Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

none of these options were used in the script, am I correct?

Yes, you are. They are extension possibilities.

Leon
  • Members
  • 179 posts
  • Last active: May 22 2008 02:41 PM
  • Joined: 27 Aug 2007
Thanks.

@Laszlo / anyone else
I saw in another thread, you mentioned this

There is a globally unique HW disk ID, which you can get in XP with a few lines of code, but including that in a PC fingerprint causes problems: if you replace your disk, you have to re-register your protected SW.

The drawback mentioned doesn't bother me.
Q1. Could u explain / point me towards how to do get the HW disk ID?
Q2. Is the HW disk ID, PROCESSOR_LEVEL or PROCESSOR_REVISION, completely unique 'per unit produced' or just unique per model?
Q3. Is it possible to get processor serial number using AHK?

Reason for asking is that I want to build a system like Laszlo's. However I don't want to use user name and a few others that I feel are too prone to change.

Murp-e
  • Members
  • 531 posts
  • Last active: Sep 27 2011 11:44 AM
  • Joined: 12 Jan 2007
I'm following this thread since I've implemented the SW protection scheme into my program. I use the customer email + domain name variables to create a license key which is valid throughout an entire domain.

I added some code to the key generator to upload the license key to my website so that customers themselves have the oppurtunity to download it later if they loose it. I made a very simple webpage which can be accessed from the Help menu of my program.

I think the setup works fairly well, except for the fact that I don't have any customers as of yet(!). I thought I'd mention this, and if there's any interest for any of the code I'll gladly provide it. Also, I think there should be an email component of the license generator. It should be a program that runs continuously on a server and checks for emails with certain information in them, if it gets one, it creates the license key and emails it back to the -paying- customer.

I want to set this sort of thing up with PayPal, but unfortunately I do not have access to a windows server that I can use for this because my website is on a hosted Linux server. Any workarounds for this?

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

how to do get the HW disk ID?

Here you find source code and demo.

Is the HW disk ID, PROCESSOR_LEVEL or PROCESSOR_REVISION, completely unique

The Disk ID is globally unique, if the manufacturer follows the standard. (Most of them do.) The processor level and revision are not, but many Pentiums do have a globally unique processor ID, you can use.

get processor serial number using AHK?

See here. Follow the posted link there for explanations and usage.

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
The problem with that is that post doesnt show how to get a unique cpu id. I couldnt figure out how to get it to work to get other information

Leon
  • Members
  • 179 posts
  • Last active: May 22 2008 02:41 PM
  • Joined: 27 Aug 2007
@Laszlo
thanks for your help.

get processor serial number using AHK?
See here. Follow the posted link there for explanations and usage.

Even though I'm doing this mostly for the challenge, I'm afraid your post in that thread is still too far beyond my understanding.
The posted link in that thread is not working. So maybe that would have illed in the gaps but I'm not sure.

I should revise my request:
What is the simplest piece of machine unique info I can find?
2 or 3 pieces of info will be largely sufficient for now.
I will use that to construct a weak system, then improve upon it by adding more pieces of info as and when I can understand their retrieval.

In this post you mentioned Product ID as found in the registry.
Out of curiosity what was the reason for not using this info in your system?