Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Serial Validation
No permission to create posts
May 19, 2017
11:17 am
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Hello,

I am wondering if anybody has any material on serial generation and validation.

I have found a few programs online in visual basic that work.  I figured it was worth asking if anybody has a more elegant solution?

June 7, 2017
6:05 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

After more research I have come to this conclusion,

I have created a successful serial generator in the form of

J7H8-HIO9-678H-4796 (Just like real serial codes!) haha

With these tutorials: 

Random Number Generator

Create .txt file (Outdated but look up fStream instead of ofstream and you should be fine)

 

I am currently at the stage of http handling, and some sort of VST initialization file or a "one time event" within the VST SDK to check serial validation.

 

I will post as I get more information but am open to any other forms of validation! (even verbal affirmation haha)

July 4, 2017
10:10 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Has anyone found a way for the user to input a string to Rackafx?

July 5, 2017
11:12 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

If you are trying to do copy protection, then you have a lot of work to do as there are a lot of options. If you try to do it yourself, you will likely get hacked almost immediately if your plugin ever gains popularity. There are several plugin vendors who don't even bother with licensing. 

In order to let the user input a serial number, you would have to generate the message box, input field, and pick up and decode the license, and you'd have to do that for both Win and Mac on your own. This would likely need to happen during the installation process - if you wanted to let the user have a free version, then upgrade from within the plugin while it is running, then you have a lot of work to do - maybe even more work that creating the plugin itself!

RackAFX does is not responsible for generating message boxes for license key inputs. The VSTGUI library does provide a modal view that you might be able to embed a CTextEdit box into, but I have not looked into that. 

- Will 

July 5, 2017
11:49 am
Avatar
Mike Gazzaruso
New Member
Members
Forum Posts: 2
Member Since:
July 5, 2017
sp_UserOfflineSmall Offline

Hi, some time ago we tried to implement Copy Protection for our plugins made with RackAFX.

There is a plethora of copy-protection/licensing websites that offer this service. 

 

But if keyword is "security", only a few options are possible. Reason from Propellerheads use Codemeter/WIBU for copy protection. It uses dongle authentication. It's inviolable, the moment. 

But:

1) At the time we had many problems for encapsulating code into .dll (or .component, on OSX), due to code bugs in their own SDK. We worked aside with their technicians and Will (from remote) but no way to get it done. 

2) License cost per-dongle / per-user is prohibitive. At the time, I remember you must calculate +120 € PER SELLED PLUGIN (you gave your user a dongle with license)

There is also ILOK2 (EDEN) used by Pro Tools. 
Inviolable, at the moment, but cost exceeds also Codemeters!

Take your conclusions ..!

July 5, 2017
11:52 am
Avatar
Mike Gazzaruso
New Member
Members
Forum Posts: 2
Member Since:
July 5, 2017
sp_UserOfflineSmall Offline

My opinion is: if your plugin rocks, and merchandising is done well, you will sell *also* if you get cracked (you can implement more features on a periodical basis etc.,)

Next, if you get a reasonable audience and success, you could afford Codemeters or EDEN and go full throttle.

 

This is my opinion.

Other copy protection websites/sdks are totally flaw. No security for you, only money lost, trust me. 

July 5, 2017
12:33 pm
Avatar
Derek
Member
Members
Forum Posts: 41
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Hi everyone, Will asked me to jump in here as I've done serial number validation on a released RAFX plugin, Stealth Delay (www.polygonsheep.com). It works on Mac & PC and allows the user to enter their registration info after installing and then anytime while running the demo.

First, I'd like to give my opinion on software registration / validation. Pretty much no registration process is hack-proof. If you release software on the internet, someone is going to use it without paying you. That's just the way it is and you need to accept that as a cost of doing business in the digital realm. However, I like to believe most people are honest but also need a little encouragement to stay honest. Meaning if you release your full software on the honor system and simply ask people to pay if they use it, you're going to get a lot less people paying than if you implement some basic registration that prevents them from using it freely forever. Reaper uses the honor policy so it must work for them and it requires no extra work on the developer's part. I preferred to require a registration key to unlock full functionality so it hopefully encourages the user to pay if they want to use the product long term. Either way, I wouldn't implement any registration checks that I wouldn't want to deal with myself when using some other software. There's mountains of posts debating this stuff on various internet forums and I don't want to start another debate here, just letting you know why I did what I did. I'm not trying to stop piracy of my software, just trying to keep honest people honest.

Also, I'll point out that there are key-gens for my plugin. Do they work? Maybe, maybe not. I haven't tried as I don't really care. Again, it's a cost of doing business in software.

Anyway, on to the implementation. I use a partial serial number verification approach. This website has an excellent write up on what that means along with code samples, http://www.brandonstaggs.com/2.....in-delphi/ and I would recommend reading that first. It covers a lot of great ideas and info. His code samples are in delphi but should be easy enough to translate to other languages. I do serial number generation in php during the purchase process at fastspring and save that info in a database (users can log into my website and see their registration keys), then check the serial number in C++ in the plugin. I have a "registration" button in the demo that brings up a text entry box, CTextEdit class. The user can enter their name and serial number and the code does the validation. If the registration is valid, save that off in a file and load that file next time they open the plugin then perform the check again. Couple of issues I ran into, I didn't add support for UTF8 from the start (you should), and there are some DAWs that steal the space key (or other keys) from the plugin. You may have to press Shift-Space to actually enter a space in the plugin's text field. There may be a solution for that but I simply added that info to the release notes and haven't had much confusion from users. I also went with a 20 char long alpha-numeric serial number.

I will agree with Will that this is a lot of work. The advantage is once you work out a system, it will be fairly simple for your future products. I don't want to get into a ton of specifics of my implementation but that link above should give you enough info to create a basic serial number registration and give you ideas on how to make it more hack-proof. I would suggest getting his examples working in your language of choice as a first step. But pay attention to what he says about just validating the checksum when the user enters their info, and then validate some of the other keys in other parts of the code (e.g. after certain actions have been performed by the user, or after a random amount of time). If you just want a super basic implementation, only validate the checksum and call it good.

I'll check back in to this thread occasionally so if you have specific questions about partial key verification hopefully I can answer.

July 5, 2017
1:04 pm
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Thanks Mike and Coffee for the input - much appreciated and very useful insights!

Skyler, Coffee's website http://www.polygonsheep.com is a great example of marketing a RackAFX designed plugin via a lean and clean e-commerce site. Also, his plugin GUI is a fantastic example of what can be done with the Advanced GUI API as a pure-custom GUI.

- Will

July 5, 2017
1:44 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

I agree with coffeemate, that some form of security, gives a customer a since of pride and respect of purchase.  They are buying the serial not the software, or the license to use my software inevitably or at least that's what I tell my self to sleep at night.  

I have a simple security set up though, 

 

Step One:     If json request (the poor mans dongle),

Step Two:    Check If File-Serial.txt variable compares against string array.

Step Three:  If File-Serial.txt variable equals a string array element field...run normal

Step Four:    If not...  prompt user [gap in understanding]

Step Five:    If user input data compares well against json request string array, generate variable within serial.txt and create serial.txt, ( into custom folder, created with installer)

 

I found that to be simple, along with a Viewcontainer that has the ability to set itself to ->setVisible(false), this gives the illusion of a "pop up window"

I have ran test's and have not been able to input a string or a const char* with a CTextLabel and a CTextEdit. As soon as the custom view is created I can no longer "manually" edit the box.

I tried an enum per character in the character array, but even this would not allow for numbers. (Can be remedied through spelling numbers...{one,two,three} janky, but it gets-er-dun haha)  

 

I guess the gap I have is:  How does a CTextLabel, and or CTextEdit object receive keyboard commands or do we make our own keyboard?

 

 

 
July 5, 2017
2:02 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

W Pirkle said
Thanks Mike and Coffee for the input - much appreciated and very useful insights!

Skyler, Coffee's website http://www.polygonsheep.com is a great example of marketing a RackAFX designed plugin via a lean and clean e-commerce site. Also, his plugin GUI is a fantastic example of what can be done with the Advanced GUI API as a pure-custom GUI.

- Will  

All useful, insightful, and humbling.  Thanks for caring!

 

I like the site and it feels trusted as a consumer, I plan to utilize Facebook advertising.

In the words of Will for the setVisible function "this is a powerful functionality"

Thanks brothas! 

July 5, 2017
5:10 pm
Avatar
Derek
Member
Members
Forum Posts: 41
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Hey Skyler,

I don't think there was anything tricky to get CTextEdit to accept keyboard input. Are you testing your plugin from RAFX?

Here's an example CTextEdit that should allow keyboard input.  When you click on the TextEdit area it should show a blinking cursor and then allow keyboard input.

 

CFontDesc * fontDesc = new CFontDesc("Arial");

CPoint labelOrigin = CPoint(10, 10);
CPoint labelSize = CPoint(200, 50);
CRect labelRect = CRect(labelOrigin, labelSize); // can also construct with top, left, bottom, right

CTextEdit *nameEdit = new CTextEdit(labelRect, NULL, -1);
if (nameEdit)
{
nameEdit->setFontColor(CColor(185, 185, 185, 255));
nameEdit->setText("");
nameEdit->setFont(kNormalFontBig);
nameEdit->setHoriAlign(kLeftText);
nameEdit->setTransparency(true);
if (fontDesc)
{

fontDesc->setSize(24);
nameEdit->setFont(fontDesc);
}
this->addView(nameEdit);
}

 

Derek

July 6, 2017
4:05 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Hey Coffee,

I have some confusion with what you wrote, as it differs from the tutorials slightly.

 

I have errors with, the if(fontDesc) and the this->addview(nameEdit)

new CTextEdit(labelRect,Null, -1)

 

Can we declare the edit box just like a textlabel, then extract the data after?

If so how would that look, just using getText(); rather than setText?

 

Thank you!

July 6, 2017
4:10 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Well, I put the top lin within the header file and that eliminated 2 errors.

 

The last and only error is this->addView(nameEdit);

July 6, 2017
7:53 pm
Avatar
Derek
Member
Members
Forum Posts: 41
Member Since:
November 19, 2015
sp_UserOfflineSmall Offline

Hey Skyler,

Sorry for the confusion, this code assumes you're in a CViewContainer object.

You can replace the "this" from "this->addview(nameEdit)" with what ever view container you're adding the text edit box to. (e.g. myDialogBox->addview(nameEdit) )

If you're adding things directly to a CFrame you can do that frame->addView(nameEdit)  (or whatever your CFrame variable is called)

I'm assuming your using a custom vstgui class? Like the CCustomVSTGUI class from the CustomViewsFive project?  If so you can add that code in CCustomVSTGUI::createControls()

 

Derek

July 7, 2017
3:04 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

I am not using a custom GUI class, since the level of programming I was at when starting this endevear.  I'm hoping to get it all finished this weekend and plan to understand that deeper once the burden is off my shoulders of survival.  

Haha I'm slowly architecting the understanding now of c++ and dsp. 

I will demo and repost later today.  Thank you for direction!

July 8, 2017
10:16 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

I got your code to work, along with a deeper understanding of CFrame/ViewContainer application.

This diagram from Advance Module 7 makes more sense, basically as you "incept" the ViewContainer in the designer the process is the same within the code.

A dream within a dream within another dream.

 

I have ran test's both attempting to set my m_pSerialBox setVisible(false), or us a UiSwitchcontainer to "look away" from the m_pSerialBox and look to a transparent container.

Both have proven futile...

I only have this, and presets left then my plug in is complete!!! (except for exporting)

Two Questions:

1. How to make my m_pSerialBox ViewContainer dissapear after a serial check validation?

2. How to grab text from m_pSerialBox->addView(nameEdit)?

Thanks for the help!!

July 9, 2017
10:38 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

1. See Module 4 of the Advanced GUI API on hiding/showing/moving controls dynamically

2. See the VSTGUI documentation (vstgui4/vstgui/Documentation/index.html) on the CTextEdit control and find the function that gets text from the control. 

- Will

July 10, 2017
10:25 pm
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Hey Will,

Thanks for the Tutorial, I had the projects open but did not go back through the document I was committing a brain-fart.

I have gotten all the pieces to my software created but am still missing the connection point between my string and a comparison. 

 

if (m_pCheck->getText() == "Good"), essentially allow access to the software. 

I want the code to be checked by a case 46: On/Off button

Is there a better or functional way to connect m_pCheck to a Validation if statement?

 

I have already tried using a string also,

Thanks again,

July 11, 2017
9:35 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Do a google search for:

string comparison functions C++

Note the kind of string pointer that getText( ) returns and then choose the function that works best.

Warning: your method for simply comparing strings is extremely hack-able. Do a google search for:

hacking serial number string comparisons

and you'll see what I mean. 

July 19, 2017
7:48 am
Avatar
Skyler
Member
Members
Forum Posts: 47
Member Since:
November 17, 2015
sp_UserOfflineSmall Offline

Derek said
Hey Skyler,

I don't think there was anything tricky to get CTextEdit to accept keyboard input. Are you testing your plugin from RAFX?

Here's an example CTextEdit that should allow keyboard input.  When you click on the TextEdit area it should show a blinking cursor and then allow keyboard input.

 

CFontDesc * fontDesc = new CFontDesc("Arial");

CPoint labelOrigin = CPoint(10, 10);
CPoint labelSize = CPoint(200, 50);
CRect labelRect = CRect(labelOrigin, labelSize); // can also construct with top, left, bottom, right

CTextEdit *nameEdit = new CTextEdit(labelRect, NULL, -1);
if (nameEdit)
{
nameEdit->setFontColor(CColor(185, 185, 185, 255));
nameEdit->setText("");
nameEdit->setFont(kNormalFontBig);
nameEdit->setHoriAlign(kLeftText);
nameEdit->setTransparency(true);
if (fontDesc)
{

fontDesc->setSize(24);
nameEdit->setFont(fontDesc);
}
this->addView(nameEdit);
}

 

Derek  

This code has helped a lot with my understanding of vstgui functionality.

 

I am curious is there anyway to change text from outside the Cviewcontainer and the CTextEdit. Something to the extent of.

m_pContainer->m_pNameEdit->setText("working fine")

Or, is it possible to addView to the GUI directly without being within a parent container. something to the extent of.

RackafxGui->addView(nameEdit)

I know my lines of code don't work, but hopefully it's a syntax issue and not a conceptual issue.  Thanks!

No permission to create posts
Forum Timezone: America/New_York

Most Users Ever Online: 36

Currently Online:
2 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 476

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 482

Posts: 1876

Newest Members:

sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143