Advertisement
ZasieuN

LicenseManagerDomain.js

Jan 24th, 2018
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. /**
  2. * File name: LicenseManagerDomain.js
  3. * Mac OS: /Applications/StarUML.app/Contents/www/license/node/
  4. * Linux: /opt/staruml/www/license/node/
  5. */
  6. /**
  7. 1. Cari file LicenseManagerDomain.js pada folder StarUML
  8. 2. C:\Program Files\StarUML\www\license\node
  9. 3. Open via administrator text editor yang kalian punya
  10. 4. Replace semua code yang ada dengan code dibawah
  11. 5. Lalu Save
  12. 6. Buka StarUML otomatis status sudah terlicense
  13. 7. Cek pada menu Help >> Enter License..
  14. */
  15.  
  16. (function () {
  17. "use strict";
  18.  
  19. var NodeRSA = require('node-rsa');
  20.  
  21. function validate(PK, name, product, licenseKey) {
  22. return{
  23. name: "ZasieuN",
  24. product: "StarUML",
  25. licenseType: "vip",
  26. quantity: "unlimited",
  27. licenseKey: "ZasieuN Was Here"
  28. };
  29. }
  30.  
  31. function init(domainManager) {
  32. if (!domainManager.hasDomain("LicenseManager")) {
  33. domainManager.registerDomain("LicenseManager", {major: 0, minor: 1});
  34. }
  35. domainManager.registerCommand(
  36. "LicenseManager", // domain name
  37. "validate", // command name
  38. validate, // command handler function
  39. false, // this command is synchronous in Node ("false" means synchronous")
  40. "Validate License",
  41. [
  42. {
  43. name: "PK",
  44. type: "string",
  45. description: "PK"
  46. },
  47. {
  48. name: "name",
  49. type: "string",
  50. description: "name of license owner"
  51. },
  52. {
  53. name: "product",
  54. type: "string",
  55. description: "product name"
  56. },
  57. {
  58. name: "licenseKey",
  59. type: "string",
  60. description: "license key"
  61. }
  62. ],
  63. [
  64. {
  65. name: "result", // return values
  66. type: "object",
  67. description: "result"
  68. }
  69. ]
  70. );
  71. }
  72.  
  73. exports.init = init;
  74.  
  75. }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement