Sourcecode for Shareware Registering - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Sourcecode for Shareware Registering

I want to make shareware, but I want a way to make sure they register for it without the people trying to hack into it. I want them to give us a name and then they get a random unlocking code. I also want the randomization code I provide to work. How do I do that?
Jeffrey Hope


I know, I haven't been here in a long time...

Comments

  • PrzemekG_PrzemekG_ Posts: 595Member
    : I want to make shareware, but I want a way to make sure they register for it without the people trying to hack into it. I want them to give us a name and then they get a random unlocking code. I also want the randomization code I provide to work. How do I do that?
    : Jeffrey Hope
    :

    : I know, I haven't been here in a long time...
    :

    The simplest way is to save some string in to a binary file. You may also encode it to secure the registrated software from being copied from one PC to an other.

    This is an example:
    You make some system detection (the size of the RAM, the type of the CPU (86,286,386,...), features of the cpu (line MMX, SSE2, CMOV, 3DNow, ...), mother board serial), there are a lot of source code of that type of detection.
    You encode the data into a string, for example:
    byte 1: cpu vendor
    - 0 = Intel
    - 1 = AMD
    - 2 = Cyrix
    - 3 = VIA
    - ...
    byte 2: cpu family
    - 0 = 86
    - 1 = 186
    - 2 = 286
    - 3 = 386
    - ...
    byte 3: RAM size
    - 0 = from 0 to 8
    - 1 = from 8 to 16
    - 2 = from 16 to 32
    - 3 = from 32 to 64
    - 4 = form 64 to 128
    - ...

    and more if you like

    Your computer generate a program ID from it. The client sends you the resulting code.

    Then you xor particular bytes by bytes from your password
    for example:

    [code]
    MyPassword$ = "PASS"
    MyString$ = "1234567890"
    MyKey$ = ""
    p% = 0
    for i% = 1 to len(MyString$)
    p% = p% + 1
    s$ = mid$(MyString$, i%, 1)
    x% = ((i%-1) Mod Len(MyPassword$))
    x% = x% + 1
    pass$ = mid$(MyPassword$, x%, 1)
    pc% = asc(pass$)
    kc% = asc(s$)
    MyKey$ = MyKey$ + chr$(pc XOr kc)
    next

    [/code]

    Then you only convert particular characters to decimal or hex number and give it to the client.

    The client enter this code to your program, your program decodes it (or if you use one way encription algoritm (like CRC), instead of decripting the code, it generates the ID once again, and encript it) and compare if both are equal. If yes, it stores some sort of info into a file that this program is registred!.

    There are many ways of doing it, I know a lot of them (mayby some day, I will make that sort of lib).

  • : : I want to make shareware, but I want a way to make sure they register for it without the people trying to hack into it. I want them to give us a name and then they get a random unlocking code. I also want the randomization code I provide to work. How do I do that?
    : : Jeffrey Hope
    : :

    : : I know, I haven't been here in a long time...
    : :
    :
    : The simplest way is to save some string in to a binary file. You may also encode it to secure the registrated software from being copied from one PC to an other.
    :
    : This is an example:
    : You make some system detection (the size of the RAM, the type of the CPU (86,286,386,...), features of the cpu (line MMX, SSE2, CMOV, 3DNow, ...), mother board serial), there are a lot of source code of that type of detection.
    : You encode the data into a string, for example:
    : byte 1: cpu vendor
    : - 0 = Intel
    : - 1 = AMD
    : - 2 = Cyrix
    : - 3 = VIA
    : - ...
    : byte 2: cpu family
    : - 0 = 86
    : - 1 = 186
    : - 2 = 286
    : - 3 = 386
    : - ...
    : byte 3: RAM size
    : - 0 = from 0 to 8
    : - 1 = from 8 to 16
    : - 2 = from 16 to 32
    : - 3 = from 32 to 64
    : - 4 = form 64 to 128
    : - ...
    :
    : and more if you like
    :
    : Your computer generate a program ID from it. The client sends you the resulting code.
    :
    : Then you xor particular bytes by bytes from your password
    : for example:
    :
    : [code]
    : MyPassword$ = "PASS"
    : MyString$ = "1234567890"
    : MyKey$ = ""
    : p% = 0
    : for i% = 1 to len(MyString$)
    : p% = p% + 1
    : s$ = mid$(MyString$, i%, 1)
    : x% = ((i%-1) Mod Len(MyPassword$))
    : x% = x% + 1
    : pass$ = mid$(MyPassword$, x%, 1)
    : pc% = asc(pass$)
    : kc% = asc(s$)
    : MyKey$ = MyKey$ + chr$(pc XOr kc)
    : next
    :
    : [/code]
    :
    : Then you only convert particular characters to decimal or hex number and give it to the client.
    :
    : The client enter this code to your program, your program decodes it (or if you use one way encription algoritm (like CRC), instead of decripting the code, it generates the ID once again, and encript it) and compare if both are equal. If yes, it stores some sort of info into a file that this program is registred!.
    :
    : There are many ways of doing it, I know a lot of them (mayby some day, I will make that sort of lib).
    :
    :
    That justs reminds me--I've read about a complicated code in a book and I would like to use it here. I don't remember the name of the code, but if you're encrypting and decrypting codes that uses numbers (this is my example), you'd come up with a keyword (or should I say key-number) and then make a chart like this (sorry if it isn't straight):

    A KEYWORD NUMBER
    C X|1234567890
    T -+----------
    U 1|3529014867
    A 2|5290148673
    L 3|2901486735
    . 4|9014867352
    N 5|0148673529
    U 6|1486735290
    M 7|4867352901
    B 8|8673529014
    E 9|6735290148
    R 0|7352901486

    Of course I'd have to encrypt the chart too...
    Is there a way to do this?
    Jeffrey Hope


    I know, I haven't been here in a long time...

  • PrzemekG_PrzemekG_ Posts: 595Member
    I think that the QB programmers are the most present programmers in the net, so finding an encription algoritm shouldn't be a problem (if you want an easy one, thing about using NOT or XOR).
Sign In or Register to comment.