MAC - PC hardware identifier for licensing in secure way?


last step before releasing our extension…
What’s the right or best way to get identifiers from hard on both PC and MAC from Ruby?
Serial number? network? what else?

any advice appreciated
Best Regards

typically the MAC (Medium Access Control) address (usually an Ethernet adapter => Win: “console > ipconfig /all”).

some ideas:

Be careful that your scheme does not become obtrusive to paying users, it’s better to have some ripped off copies than your customers not be able to use what they have paid for.

1 Like


Thanks for the links. I add that technical note from apple ‘Uniquely Identifying a Mac Computer’ about serial number, mac address, network registration and there caveats.

Actually issue is all about OSX. We know so few on Mac and system_profiler, sysctl, ioreg, ifconfig or perhaps any other command. We need reliable command from Ruby, obtrusive as less as it can.

An example would be retrieving UUID, MacAddress, Cpu, Hdd, Video and Os data.
It looks sysctl able to retrieve some processor data, ioreg can get uuid and mac adress, ifconfig retrieves mac address and system_profiler nearly everything. We really know no more.
Can sysctl or ioreg do the whole job?
What are the strongest, the most robust?
Do all this commands open a small black window as WMI does on Windows?
Pitfalls, drawbacks, anything you think must be said even on Windows?

Best Regards


No, system calls are run in the SU Ruby thread…

don’t you already use RubyEncoder?

it has built in locking options…

To protect your scripts from unauthorized usage RubyEncoder has added some features that can optionally lock your scripts to run only from predefined IP addresses, domain names or LAN hardware addresses. RubyEncoder can also easily produce trial versions of your scripts by setting an expiry date for the script or by limiting the number of days that the protected script will work. With RubyEncoder you may optionally lock your scripts so that they require a special license file in order to run. This file may be distributed with the script or separately from it and this option gives you an opportunity to encode your script once and distribute to users with different licenses. You may easily provide your customers with a license file for our product at the precise moment of purchase, or downloading of a trial version of your product.


Hi John,
Nice to meet you again

RubyEncoder? no we don’t. All by ourself!
Time consuming of course but what an enjoyable and fulfilling experience!
We have just got rid of .rbs file no longer needed. SUalive Free next release also without any .rbs
Most tools encrypt data file then decrypt at load-time which means human readable code inside SketchUp and consequently easy access from Ruby console or debugging tools. We finally chose unusual code one-way obfuscation rather than two-way encryption decryption. Not economic rational albeit not really snowball as ThomThom said roughly a year ago.

So we saw licensing as a small part but are now meeting unexpected issue with backtick as you may read here

Wonder if the same on OSX? probably…

Have a good day

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.