Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * File name: LicenseManagerDomain.js
- * Mac OS: /Applications/StarUML.app/Contents/www/license/node/
- * Linux: /opt/staruml/www/license/node/
- */
- /**
- 1. Cari file LicenseManagerDomain.js pada folder StarUML
- 2. C:\Program Files\StarUML\www\license\node
- 3. Open via administrator text editor yang kalian punya
- 4. Replace semua code yang ada dengan code dibawah
- 5. Lalu Save
- 6. Buka StarUML otomatis status sudah terlicense
- 7. Cek pada menu Help >> Enter License..
- */
- (function () {
- "use strict";
- var NodeRSA = require('node-rsa');
- function validate(PK, name, product, licenseKey) {
- return{
- name: "ZasieuN",
- product: "StarUML",
- licenseType: "vip",
- quantity: "unlimited",
- licenseKey: "ZasieuN Was Here"
- };
- }
- function init(domainManager) {
- if (!domainManager.hasDomain("LicenseManager")) {
- domainManager.registerDomain("LicenseManager", {major: 0, minor: 1});
- }
- domainManager.registerCommand(
- "LicenseManager", // domain name
- "validate", // command name
- validate, // command handler function
- false, // this command is synchronous in Node ("false" means synchronous")
- "Validate License",
- [
- {
- name: "PK",
- type: "string",
- description: "PK"
- },
- {
- name: "name",
- type: "string",
- description: "name of license owner"
- },
- {
- name: "product",
- type: "string",
- description: "product name"
- },
- {
- name: "licenseKey",
- type: "string",
- description: "license key"
- }
- ],
- [
- {
- name: "result", // return values
- type: "object",
- description: "result"
- }
- ]
- );
- }
- exports.init = init;
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement