Jump to content

Software License Key and Keygen


ChrisL
 Share

Recommended Posts

I made this a while ago as part of a one off application, I've stripped it out of my app and put it as a general reg key system.

You can have it as a license key system or a license keyed trial software or just a time limited trial.

All it does is encrypt the license data and store it in an ini file which is cunningly disguised as a dll file, if you were to open the dll in notepad it just looks like jibberish.

If using the trial software option and the user puts the date back then the software will expire the next time validation is ran.

It is an idea to periodically run the validation fuction during the day or before a specific function in your application, this also nags the user that it is evaluation software on trial.

Just thought it might be useful for someone.

Chris

Edit: New Version of the trial software attached.

Added the ability to make the reg code optional and have just a trial period

Previous downloads 435

KeyGen.au3

TrialSoftware.au3

Edited by ChrisL
Link to comment
Share on other sites

I don't like SHAREWARE software. GNU is the best form of software licensing.

The only good software is the FREE Open-source software. I don't like to not know what's inside the program I just bought, or why it is doing this or that...

I will never want money for my software nor release it as closed-source. And definitely I will never release it as shareware.

This is my personal oppinion.

Edited by lokster
Link to comment
Share on other sites

  • Developers

I don't like SHAREWARE software. GNU is the best form of software licensing.

The only good software is the FREE Open-source software. I don't like to not know what's inside the program I just bought, or why it is doing this or that...

I will never want money for my software nor release it as closed-source. And definitely I will never release it as shareware.

This is my personal oppinion.

That's fair enough but you forgot to state that people using your software are "on their own" and have no rights to any support....

I other words, writing software for fun is nice but doesn't supply you with any food for the family .. :whistle:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I don't like SHAREWARE software. GNU is the best form of software licensing.

The only good software is the FREE Open-source software. I don't like to not know what's inside the program I just bought, or why it is doing this or that...

I will never want money for my software nor release it as closed-source. And definitely I will never release it as shareware.

This is my personal oppinion.

What does that have to do with the above?

Some people want to limit the use of their software, that is all I'm trying to offer.

A constructive opinion on my idea/script would be more appreciated than the virtues of SHAREWARE and GNU

:whistle:

Link to comment
Share on other sites

JdeB I supply "food for my family" by working in a software company, which software products ARE commersial. But when I work on my own software, I prefer to release it for free, without any limitations, and with source code.

:Edit

I don't want to start endless discussion here - it's just not the right thread :whistle:

Edited by lokster
Link to comment
Share on other sites

Chris,

Nice work, your average user won't get this, but it's not something I would use for industry programs.

I've seen a keygen lately, I liked, and thought I'd share it with someone, in case they wanted to write the plugin for it.

Your CPU id is pretty hard to change, and for me, would be the best solution.

First, because it's not that often that people replace their CPU, and second, because any other piece of hardware can be removed or replaced that could really help with identifying for purposes of creating a key, which would make it obvious what you had done.

Anyway, on to describe this keyben security program. It gets the CPU ID, and uses 4 different encryption codes. This makes it harder for the user to crack, because four programs exist, with 4 different encryption codes. Then, it stores it on the users hd, but it stores it in the same sektor as the exe is, I'm not exactly sure how this part works, without damaging the fs, I just know that it happens. Then you can do the keygen stuff. It never decrypts anything, the product ID is an encrypted version of the CPU id, user's first and last name, and the program numer, 1-4. From that, another key is made, which is the same thing. The program has an algo, rather than a builtin keygen, to check the keys. Anyway, like I said, nice work, just trying to throw some more ideas out there.

Not even sure how secure this one is, just something I seen in the works. :whistle:

HTH,

~~TheCreator~~Visit http://tysdomain.com for personal software and website solutions.

Link to comment
Share on other sites

Then, it stores it on the users hd, but it stores it in the same sektor as the exe is, I'm not exactly sure how this part works, without damaging the fs, I just know that it happens.

Sounds like it is being stored in the Alternative Data Stream of an NTFS partition, having a program re-write itself to store the value would be fairly problematic but it could be done.
Link to comment
Share on other sites

  • 3 weeks later...

Wow, thanks a lot ChrisL for some really interesting coding!

As far as the opensource/shareware debate is concerned, you're unlikely to be able to make a living out of writing software with the open source model, unless you sell services surrounding your program (which is not very evident). So making a trial / shareware version is fine by me; sure some people will complain "n$ is too much for me" or "i would rather get it for free", but a programmer has the right to ask to be paid for his work!

Also concerning the solidity of serial numbers and the lot, I think what we're looking for is a middle-of-the-road compromise. Just enough to thwart your common script kiddie, but not so ironclad that it would require months of devious trickery :)

BTW the real irony of this thread is someone claiming the only good software is open source - well the fact that it's open source / shareware has little to do with the quality of the software. Furthermore, each programmer is free to pick whichever model suits his tastes. There are some cases where open source is not the best solution.

Edited by Celeri

I am endeavoring, ma'am, to construct a mnemonic circuit using stone knives and bearskins.SpockMy UDFs:Deleted - they were old and I'm lazy ... :)My utilities:Comment stripperPolicy lister 1.07AutoIT Speed Tester (new!)

Link to comment
Share on other sites

Sounds like it is being stored in the Alternative Data Stream of an NTFS partition, having a program re-write itself to store the value would be fairly problematic but it could be done.

There is usually some empty space in the last cluster of a file. But someone would have to write a UDF to read raw sectors, which is not too evident.

There are also ways to hide registry keys, and that would do the trick. Now will this trick work with AUtoIT3, that's something else...

But the best solution (in my opinion) is to keep the price of your software so low as to make the most out of the situation; sure you can find someone to crack a program but if the software costs 10$, 20$, it makes no sense.

I am endeavoring, ma'am, to construct a mnemonic circuit using stone knives and bearskins.SpockMy UDFs:Deleted - they were old and I'm lazy ... :)My utilities:Comment stripperPolicy lister 1.07AutoIT Speed Tester (new!)

Link to comment
Share on other sites

@lokster:

There are people who write programs for fun -- that's cool.

There are other people that want to be paid for their efforts on writing something -- that's cool too.

There are people who work on software houses and get paid to write commercial software -- we all know that and use their programs.

There are people who create such companies in their homes and sell their programs through the internet -- no problem with that.

There are people who want to use free software -- that's cool too.

There are people who want to buy commercial software -- that's acceptable.

You know we live in a free world. Anybody can do whatever he/she wants. I have no problem with that if it doesn't insult me.

Your second post was, probably to all of us, something like: "hey, what are you trying to tell us here? to use trialware code in our AU3 scripts? AU3 is free, and we want all the scripts written using it to be free too!". That's wrong.

AU3 is the media to do something. What are you going to do with it, it's up to you considering that you respect its license.

I'm sorry but it's on anyones free will to sell software, to buy software or to use free software. And since all these are on one's free will, your personal statement is simply irrelevant to this topic. So keep it for yourself and make your comments only for the coding part (if you have any). Do us a favour and leave your ethic aside, please. You are off-topic.

@ChrisL: Thank you for sharing this with us mate.

Edited by erebus
Link to comment
Share on other sites

I don't like SHAREWARE software. GNU is the best form of software licensing.

The only good software is the FREE Open-source software. I don't like to not know what's inside the program I just bought, or why it is doing this or that...

I will never want money for my software nor release it as closed-source. And definitely I will never release it as shareware.

This is my personal oppinion.

Reminds me of this

http://tv.truenuff.com/mac/services.php

Link to comment
Share on other sites

  • 2 weeks later...

I made this a while ago as part of a one off application, I've stripped it out of my app and put it as a general reg key system.

You can have it as a license key system or a license keyed trial software.

All it does is encrypt the license data and store it in an ini file which is cunningly disguised as a dll file, if you were to open the dll in notepad it just looks like jibberish.

If using the trial software option and the user puts the date back then the software will expire the next time validation is ran.

It is an idea to periodically run the validation fuction during the day or before a specific function in your application, this also nags the user that it is evaluation software on trial.

Just thought it might be useful for someone.

Chris

I have test this very nice software License Key and Keygen it works very good and I think and would thanks Chris for this very good program.

Link to comment
Share on other sites

  • 3 months later...

Hey, Nice script.. I just used your script in one of mine and gotta stop in and tell ya "Nice Script" I made a couple modz on it to load the fake dll file and check if it is loaded or not.. Just make a notepad.txt file and open it. Save as and pull down the file type and choose "All Files" Then just name your file whatever.dll and it will save as a dll. Put in the same directory when compiling and name the file in your script. This mod added to your above script will check to see if the file exist and if not load into the appointed location. I didn't have enough upload space to upload an example.

edit: typo

If FileExists(@Windowsdir & "\whatever.dll") Then
 ;do nothing
Else
FileInstall("C:\whatever folder\whatever.dll", @Windowsdir & "\whatever.dll"); Sets fake dll file in the windows directory
EndIf

I put this just below the includes so it is pretty much first ran.

Edited by gesller
Link to comment
Share on other sites

ok i ran across it

check comments...

Check Code

;I only have one working code, i lost my long list... I'm sure you coulde create
;a code generator for it fairly eiasly
$code='1234-4353-2343-0000-1';This works
;$code='2349-4353-2343-0000-1';This doesnt work
;Must be formatted correctly with 4 '-' 
;The function doesn't check formatting...
$b=KeyCode($code)
If $b=0 Then 
    Msgbox(16,"ERROR","Incorrect Serial Code!")
Else
    Msgbox(64,"CORRECT","Correct Serial Code!")
Endif
func KeyCode($Code)
$qll = (StringSplit($code, "-" ))
$err = 1
For $i=0 to 2 step 1
If $qll[$i] = "0000" Then $err = 0
Next
If $err = 1 Then
    Dim $c1,$c2,$c3
    $c1=sin($qll[0])
    $c2=sin($qll[1])
    $c3=sin($qll[3])
    $A=$c1+$c2+$c3
    while $A>1
        $A=$A-1
    wend    
    while $A<0
        $A=$A+1
    wend
    $A=round($A,4)
    $B=$A*10000
    $qll[2] = Int($qll[2])
    $b = Int($b)
  ;MsgBox(0,'ANS',$ B) 
    if $B=$qll[2] then 
        return(1)
    Else
        return(0)
    EndIf
EndIf
    return(3)
endfunc

Code Generator

;dont ask for comments lol just use it
;Key generator
$1 = Round(Random(1000,9999),0)
$3 = Round(Random(1000,9999),0)
$4 = Round(Random(1000,9999),0)
$code=$1&"-"&'1111'&"-"&$3&"-"&$4&"-1"
$hkey = KeyCode($code)
While Stringlen($hkey) < 4
    $hkey = '0' & $hkey
Wend
MsgBox(0,'',$1&"-"&$hkey&"-"&$3&"-"&$4&"-1")
func KeyCode($Code)
$qll = (StringSplit($code, "-" ))
$err = 1
For $i=0 to 2 step 1
If $qll[$i] = "0000" Then $err = 0
Next
If $err = 1 Then
    Dim $c1,$c2,$c3
    $c1=sin($qll[0])
    $c2=sin($qll[1])
    $c3=sin($qll[3])
    $A=$c1+$c2+$c3
    while $A>1
        $A=$A-1
    wend    
    while $A<0
        $A=$A+1
    wend
    $A=round($A,4)
    $B=$A*10000
    $qll[2] = Int($qll[2])
    $b = Int($b)
    $b = Round($b,0)
    return($B)
EndIf
    return(3)
endfunc
Edited by DBak

[center][/center]

Link to comment
Share on other sites

Hey, Nice script.. I just used your script in one of mine and gotta stop in and tell ya "Nice Script" I made a couple modz on it to load the fake dll file and check if it is loaded or not.. Just make a notepad.txt file and open it. Save as and pull down the file type and choose "All Files" Then just name your file whatever.dll and it will save as a dll. Put in the same directory when compiling and name the file in your script. This mod added to your above script will check to see if the file exist and if not load into the appointed location. I didn't have enough upload space to upload an example.

edit: typo

If FileExists(@Windowsdir & "\whatever.dll") Then
 ;do nothing
Else
FileInstall("C:\whatever folder\whatever.dll", @Windowsdir & "\whatever.dll"); Sets fake dll file in the windows directory
EndIf

I put this just below the includes so it is pretty much first ran.

I'm pleased you like it and found it useful :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...