Show DevBest [PHP, MySQL - VB6] Secure License System

Status
Not open for further replies.

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
Hello! :)

Must have VB6 on your comp

Since all of you know I am a Visual Basic, C#, PHP coder. I have made this little script which allows you to add, remove and edit licenses.

The VB6 reads the website, url path must be hidden also VB6 cannot be decompiled and you can edit the licenses using .ini files using a ini reader I placed in there

index.php

PHP:
<?php

mysqlConn();
ConfirmKey($_GET['key'], $_GET['name']);

//---
// Start the functions
//---
function mysqlConn()
{
   $q = mysql_connect("localhost", "username", "password");
   $q = mysql_select_db("database");
   return $q;
}
function ConfirmKey($key, $name)
{
   $q = mysql_query("SELECT * FROM `keys` WHERE `key`='".$key."'") or die (mysql_error());
   $q = mysql_fetch_array($q);

   if(isset($key) == $q["key"] || isset($name) == $q["name"])
   {
       echo "License is correct!";
   }
   else if(!isset($key) != $q["key"] || !isset($name) != $q["name"])
   {
       echo "License is incorrect";
   }
   else if(!isset($key) || !isset($name))
   {
       echo "License is incorrect";
   }
   else
   {
       echo "License is incorrect";
   }
}
?>

database

Code:
CREATE TABLE IF NOT EXISTS `keys` (
  `key` varchar(111) NOT NULL,
  `name` varchar(111) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Download the source and find this...

HTML:
Text = Inet1.OpenURL("http://localhost/license/index.php?key=" & LicenseKey & "&name=" & LicenseName) 'Opens the url source

Edit " " to the website where you have installed the PHP file.

config.ini

Code:
[license]
name=
key=
 

Attachments

  • licensecheck.zip
    2.5 KB · Views: 57

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I don't see the point in assigning a function for mysqlConn()? Why not just do it manually.

Nice work anyway, this is exactly what I did for the upload2.us desktop application version checker.
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
Looks great, might use this for misc. reasons and bother people with it some how.
Thanks!
 

Quackster

a devbest user says what
Aug 22, 2010
1,765
1,245
For some reason. This code

Code:
Text = Inet1.OpenURL("http://localhost/license/index.php?key=" & LicenseKey & "&name=" & LicenseName) 'Opens the url source

Is picked up as a worm/key logger. I have no idea why.
 
Status
Not open for further replies.

Users who are viewing this thread

Top