Licensing Enforcement Template (PHP)

I am very happy to announce that Serial Sense’s licensing enforcement template for PHP developers is now available! It is termed “Serial Sense Boot Template”. The Boot Template is especially useful for developers who are new to Serial Sense or are creating new solutions that will use Serial Sense’s network licensing management.

Some features supported by the SS Boot Template:

  1. Core POST processing environment for handling end-user product activation, deactivation, and a couple other useful and common actions.
  2. Basic Application API functions.
  3. Various methods for generating a unique machine ID on unix-based platforms.
  4. Built-in class function to test if a license is locally active on the running machine via SS_License::locally_active(). Of course, SS_License::active() still exists to test if license is globally active on Serial Sense’s API server.
  5. AES-256 License alias encryption. Only necessary for applications that do not check the Serial Sense API server at boot time.

Not to mention, the SS Boot Template is available for public development via GitHub here:

Download it now!
SS Boot Template v1.0 (zip format)
SS Boot Template v1.0 (bz2 format

Posted in Announcements, Implementation, Support | Leave a comment

WordPress Unique Machine IDs

Following Philip Thrasher’s great information on Generating Unique Machine IDs under Mac OS X, Windows, and Linux, I’d like to share a method that WordPress developers will find very useful. For plug-ins, themes, or applications working with WordPress, check this out: you can uniquely identify the online blog using the WordPress option “siteurl”. This code will grab it:

    $machine_id = get_option('siteurl');

Even though this is a simple and in-my-opinion reliable method for WordPress unique machine IDs, this of course has its pros and cons. Mainly, there’s the risk of a user spoofing their “siteurl”. But for this to happen, first the hacker will have to know that a machine ID is being generated in the first place for the sake of licensing. THEN the hacker needs to know that the “siteurl” is being used as the machine ID. But why would someone do this? To install the same plugin on multiple sites when they only have a single-site license.

So after altering their WordPress database to reflect the same “siteurl” as another machine ID that they some-how-know will be accepted by Serial Sense (highly unlikely) … then the hacker has to also hack at WordPress so that the WP option “siteurl” is ignored and the actual site’s URL is correctly applied else where.

For WordPress plug-ins, themes, etc. I would prefer to just use the WP option “siteurl” in order to get a unique machine ID. It’s simple and would take an experienced hacker MANY hours to accomplish this effectively. And those hours are simply just not worth it to your real customers who would gladly purchase your software before taking on this exhausting task.

Posted in Implementation, Support | Leave a comment

Generating Unique Machine IDs

A very helpful feature that Serial Sense offers is its ability to automatically manage what machines an end user can activate and use your products. This is valuable for any developer that sells software on a per-machine basis. For example, company ABC Plugins wants to sell its software as a single-machine license for $49 and a 5-machine package license for $149. The 5-machine license may a better option for a customer running a business for all employee use, while the single-machine license is clearly the better choice for personal use.

As you can see, having a function that uniquely identifies the machine executing that software is a very common need. Fortunately, there are quite a few ways of achieving this. Here I’ll detail how to accomplish generating a unique machine ID on Windows, Linux, and Mac OS X.

Mac OS X

Like most developer functions on the Mac, getting a unique machine ID is bare-bones simple. All you have to do is run the system_profiler shell command. To grab only the unique machine ID from within your program or script, call this shell command:

$ system_profiler | grep -i "Serial Number (system):" | awk '{print $4}'

This snippet’s output will return the Macintosh computer’s serial number, which is unique to every mac. I won’t go into detail on how to get this data into your program as every language has different facilities for running shell scripts. If your software will run on a hackintosh computer, where Mac OS X is installed on a non-Apple computer, then this snippet won’t be so reliable. In that case, take a look at the second half of the linux section in this article for an alternative.


Windows will require a bit of registry magic for generating a unique machine ID. Interestingly enough, Windows XP was the first operating system to assign a unique machine uuid on install. In the Windows registry, you can find the key “MachineGuid” in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography

Again, I won’t give examples on how to get registry values as this is going to differ from language to language; however, finding the uuid in the registry is a good option.


Linux is a bit trickier since it doesn’t have a machine ID set anywhere. I like to generate unique machine IDs under Linux based on ethernet mac addresses, where I will combine them all into a string without any colons. Use the below shell command:

$ ifconfig | grep -i hwaddr | awk '{print $1$5}' | sed 's/://g' | xargs echo | sed 's/ //g'

This snippet runs ifconfig, grep’s out the “hwaddr” lines that we are interested in, uses awk to grab the interface name, and finally the mac address of that interface. We then remove the colons and line breaks–if there are multiple interfaces using xargs and echo. Finally, we remove the spaces to smush everything together into one long string: the machine’s unique ID!

You can also use this method on Mac OS X if you don’t want to use the serial. This is effective in cases where someone is running Mac OS X on a non-Apple computer, which doesn’t have a machine serial. For Mac OS X, you will need to use the below one-liner:

$ ifconfig | egrep -i flags\|ether | awk '{ FS = "flags" ; printf("%s", $1); }' | perl -p -e's/\W|ether|://g'

Here’s a brief explanation of that shell command. Firstly, we run ifconfig and grep out the lines with the interface name; the lines with the mac addresses on them. This will give you all interface names, even ones that don’t have a mac address. Then we run it through awk to mush it all on one line and cut out the cruft from the interface lines. Finally, perl is used to remove colons, whitespace, and the word “ether”.

Above are just a few ways of accomplishing this task. These are some pretty solid ways of getting a unique ID off of each machine; however, like most things in the software world, none of these are truly immutable. There are ways of getting around those machine IDs and spoofing your own–which are not exactly common or trivial–but unfortunately for the software pirate, these methods are useless without direct access to Serial Sense’s databases. In the rare scenario where an end user alters their network hardware or attempts to trick the system, your applications that have correctly implemented Serial Sense will ask the end user to activate their product again.

Posted in Implementation | 3 Comments

Serial Sense’s debut

All of us at Proteus Hosting are very happy to finally announce Serial Sense’s debut!

Finally available to the general public, we are now offering all packages as a one-time purchase with no monthly commitment! That’s right: one payment for the entire life of your account’s licensing. These special one-time account payments will only be available for a limited time, so have your company take advantage of this offer while it still can. Information on plans, pricing, and new accounts can be found at the Serial Sense signup page.

Posted in Announcements | Leave a comment