Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / [Programmers Help Please] Online Serial Key Validation

Author
Message
That Guy John
13
Years of Service
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 13th Mar 2012 19:50 Edited at: 14th Mar 2012 18:59
[Solution Found]

Thread with DOWNLOAD and continued discussion here.


I was able to create a VB.NET log in form that uses the log in system of a wordpress install for authentication.
It is very rough and ugly at the moment, but I am tidying up the little bit of code it takes, commenting in the code as best I can and will be uploading it for those that are interested. Maybe a down and dirty tutorial on the process in the morning...?

[Mods]
You can lock this if you see fit.


So, I have been looking for a way to validate applications using serial keys or maybe even username: & password authentication.

#1. My initial idea of using an online MySql database got shot down once I realized, that at least with my host, MySql relies on you to manually enter IP Adresses to allow remote access to it.
I then thought of creating an application to handle getting the IP address of those that purchase software products then have that app enter the IP in my host admin to allow that IP to access the database for validation. Seems like a bit of a run around and may end up kind of a clunky process.

#2. I have done some reading on creating a mathematical serial key process, but most resources I have read say this isn't very secure anymore and there are better ways.. like validating with an online database..

You see the cycle here?

Now, other than a couple thousand dollar license for one of Flexera's suites.. Can someone please point me in another direction to go?

Are there any other online databases that can run on linux hosting that will allow remote connections globally in order to validate serial numbers.

Or am I going to have to go completely custom and come up with some sort of my own propriety database for my products to connect to?

Any insight and experience you can share would be much appreciated.

By the way, I have already tried Connector\Net , I am still left with the issue that I cannot just globally allow remote connecions to MySql.

[Adding to
I am really leaning on online activation...
And just now had an idea.. working on it, will report back in case anyone else is interested.
But please, if you have any insight reply here til I get some closure on the idea I am working on.

And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.
That Guy John
13
Years of Service
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 13th Mar 2012 22:15
Sorry for the double post, but I am on my way to a solution but I am getting stumped at the moment.

Okay, the solution I am working on is using wordpress to authenticate a log in. Too easy so far, I can log into a self hosted wordpress install using vb. The problem I am having is finding something to "IF"... check against to validate the log in was successful.

Here is my current code, checking login against wordpress installed on my computer using wamp.Keep in mind I am trying to start in its simplest form then expand on it.



And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.
Destrugter 1
17
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 13th Mar 2012 22:32
This might not be the best way to do it, but it might trigger an idea.

You could use PHP to do it. Connect to the PHP page with the app like, "site.com/validateApp.php?key=" and insert the key. Then it connects to the database, checks the key. Then you create a message for the page to return like, "Validation successful" or "Validation failed." based on what happens there.

Might not be the best, but like I said, it might help trigger an idea.

My name is Brian.
JRH
17
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 13th Mar 2012 22:34
Well, if you wanted to pursue MySQL validation you could allow a range of IPs, e.g. those of the country you are marketing to.

Alternatively you could allow remote access from any IP, but you can imagine the obvious issues with this.

I'm interested to here what others have to say?
That Guy John
13
Years of Service
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 13th Mar 2012 23:00
Destrugter,
This is basically what I am trying to accomplish with Wordpress. I am trying to use wordpress because it offers a readily available user registration system.

I could take this further by changing what page wordpress goes to after successful log in. On successful login I could have it go to an update page that would unlock the application \ continue with install process \ enable disabled controls?..

JRH, hadn't thought about allowing IP Ranges for countries.. that is an option I can investigate further. Even so, thinking further into it.. I think allowing direct connection to the database could pose major security issues..

I think I am going to stick with something along the lines of using wordpress or another system that has a user registration system built in..

Allow access from any IP.. the thing is at least with my host MySql doesn't have an option to allow global remote connections. It has to be on an IP basis. And yes, even if I was able to do this I understand the security issues.

JRH, not sure if you noticed but I have my current code posted in the second post. Still trying to find something to check against to return successful log in. As stated above, I have no problems logging into wordpress.. just racking my brain to figure out what to check against... in order to launch the rest of the forms in the app.

Keep in mind, this isn't directly involved in a particular project or application. Just trying to set up reusable code blocks.

And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 14th Mar 2012 10:50 Edited at: 14th Mar 2012 11:01
http://codex.wordpress.org/Plugin_API/Action_Reference/wp_authenticate

You'd setup a special plugin in wordpress utilizing this API. You make the plugin able to communicate through the URL. The wordpress side would get the variables passed from the URL. (This is very insecure, you should use POST requests via https if you can). Anyway, once your have authenticated, output a 1 or something through wordpress. Then your app can download this document, parse it, and if it's "1" or "success" or whatever, you proceed with the login.

It's pretty simple, but will require some PHP coding.

As for mysql, you never *EVER* want to expose mysql via the internet. You should always route through a server-side program or scripting language to mediate connections.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 14th Mar 2012 17:20
Tagging in for now

hi guys


I am currently reading into... well MySQL and PHP but first some Javascript and jQuery...

This thread post is right down my alley!!!

That Guy John
13
Years of Service
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 14th Mar 2012 19:17
MrValentine,

Here is a go getter project to help you learn he combination of php and MySql.

See if you can come up with a php user registration \ log-in system with the ability to integrate a payment gateway.

I am sure I could strip wordpress down to bare bones to accomplish this, but a single purpose built from scratch would be much more light weight.

And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 14th Mar 2012 20:53 Edited at: 14th Mar 2012 20:59
I can achieve everything you mentioned, although the payment gateway would be dependent on location...

login and user account is fairly easy in the snese that I need to read 650 thick pages first to achieve it all

not to mention SSL and encryption and secure databases etc...

its all do-able... however I dunno about exactly what youre asking lol

I recommend you build this from scratch as WP has a tendency to be totally re-written every now and then...

whereas if you built your own... say it would take you about a month and a book to the tune of ~£30-35 then you have complete control however you would also benefit from learning some html and css too as I am doing now... I found PHP very similar to BASIC, C/C++ in that its a programming language and as too Javascript... and also PHP is OOP able

Sadly my turn back into web development is delaying my experience into DBPro but I wished to remove myself from WYSIWYG DTP and into the meat and bones of hand crafting websites

EDIT

IiIiIiI spot it?

Sorry again for the double post but a word of caution if you edit a single character or any character from lower case into uppsecase or vice versa... remember to add extra text or else the forum gets fixated on you trying to double post and its abit irritating so do not do it lol

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 14th Mar 2012 20:57
Oh Joy the forum is giving me grief... I could not edit my previous post as the forum believed I was posting the same message anyway...

I wanted to say... I might look into a form of Public useable systems from myself... if that makes sense...

but I think it has hurdles along the way...

I am yet to get through a 500 page thick Javascript book and I am only on page 35 after just 2 days of reading and life in the way... pretty thick pages though mind you...

Anyway will try to edit my past post as i have a typo in it and I dislike my I's being lowercase... silly shift key on this keyboard...

That Guy John
13
Years of Service
User Offline
Joined: 30th Apr 2010
Location: United States
Posted: 14th Mar 2012 21:03
Well for a payment gateway, I was referring to plugging in paypal, google checkout, or 2checkout.

Just disregard, I was just making a suggestion as to something for you to work on as you made it seem as though you were already well on your way with learning php and MySql.

My main focus is VB.NET at the moment, so i am going to stick to using wordpress for user registration.

I wont be replying here anymore.

New thread in "programming" with download here.

And Here Is A Penguin:
FPSC OneSource [DeskTop App] - Bringing everything together into one.

Login to post a reply

Server time is: 2024-04-24 23:02:49
Your offset time is: 2024-04-24 23:02:49