FrankRizzo
June 10th, 2008, 21:42
Sanitized to protect the guilty.
Attn software authors. Javascript is NOT a good language to write your licensing protection in. Since it has to be run from it's source state, that makes removing your protection trivial. See example below:
So, what does it take to COMPLETELY disable your elaborate scheme?
I think that should be self explanatory. If not, feel free to ask your questions.
There, I've done my community service for the week.
Attn software authors. Javascript is NOT a good language to write your licensing protection in. Since it has to be run from it's source state, that makes removing your protection trivial. See example below:
Code:
function licenseCheck()
{
try {
gInfoSvc = Components.classes["@SomeAuthor.com/InfoService;1"].
getService(Components.interfaces.IInfoService);
while (!licenseValidOnStartup()) {
if (licenseTrialCheck()) {
// first time install of a trial license
return gInfoSvc.licenseValid;
}
// fall through, the invalidLicense dialog will handle showing
// the apropriate information. The trial is now expired.
var args = Components.classes["@mozilla.org/supports-array;1"]
.createInstance(Components.interfaces.nsISupportsArray);
var paramBlock =
Components.classes["@mozilla.org/embedcomp/dialogparam;1"].
createInstance(Components.interfaces.nsIDialogParamBlock);
paramBlock.SetInt(0, Components.interfaces.ILicenseCallback.LICCB_ABORT);
args.AppendElement(paramBlock);
openWindow(null, licDialog,
"AppTitle",
"chrome,modal=yes,titlebar",
args);
if (paramBlock.GetInt(0) == Components.interfaces.ILicenseCallback.LICCB_RETRY) {
gInfoSvc.refreshLicenseInfo();
continue;
}
return false;
}
} catch(ex) {
// We've already shown a dialog for this error.
return false;
}
return true;
}
So, what does it take to COMPLETELY disable your elaborate scheme?
Code:
function licenseCheck()
{
// Return TRUE that the license is good.
return true;
}
I think that should be self explanatory. If not, feel free to ask your questions.
There, I've done my community service for the week.
