StarUML5安装和破解方法

  • A+
所属分类:IT技术

注册码输入框

StarUML5安装和破解方法

方法

1、在安装路径下的StarUML\resources 路径中找到app.asar文件

2、使用WinAsar工具打开app.asar文件

3、然后找到里面的 license-manager.js文件

  1. /*
  2. * Copyright (c) 2013-2014 Minkyu Lee. All rights reserved.
  3. *
  4. * NOTICE:  All information contained herein is, and remains the
  5. * property of Minkyu Lee. The intellectual and technical concepts
  6. * contained herein are proprietary to Minkyu Lee and may be covered
  7. * by Republic of Korea and Foreign Patents, patents in process,
  8. * and are protected by trade secret or copyright law.
  9. * Dissemination of this information or reproduction of this material
  10. * is strictly forbidden unless prior written permission is obtained
  11. * from Minkyu Lee (niklaus.lee@gmail.com).
  12. *
  13. */
  14. const {EventEmitter} = require('events')
  15. const fs = require('fs')
  16. const path = require('path')
  17. const crypto = require('crypto')
  18. const UnregisteredDialog = require('../dialogs/unregistered-dialog')
  19. const SK = 'DF9B72CC966FBE3A46F99858C5AEE'
  20. const packageJSON = require('../../package.json')
  21. // Check License When File Save
  22. const LICENSE_CHECK_PROBABILITY = 0.3
  23. var status = false
  24. var licenseInfo = null
  25. /**
  26.  * Set Registration Status
  27.  * This function is out of LicenseManager class for the security reason
  28.  * (To disable changing License status by API)
  29.  * @private
  30.  * @param {boolean} newStat
  31.  * @return {string}
  32.  */
  33. function setStatus (licenseManager, newStat) {
  34.   if (status !== newStat) {
  35.     status = newStat
  36.     licenseManager.emit('statusChanged', status)
  37.   }
  38. }
  39. /**
  40.  * @private
  41.  */
  42. class LicenseManager extends EventEmitter {
  43.   constructor () {
  44.     super()
  45.     this.projectManager = null
  46.   }
  47.   /**
  48.    * Get Registration Status
  49.    * @return {string}
  50.    */
  51.   getStatus () {
  52.     return status
  53.   }
  54.   /**
  55.   * Get License Infomation
  56.   * @return {Object}
  57.   */
  58.   getLicenseInfo () {
  59.     return licenseInfo
  60.   }
  61.   findLicense () {
  62.     var licensePath = path.join(app.getUserPath(), '/license.key')
  63.     if (!fs.existsSync(licensePath)) {
  64.       licensePath = path.join(app.getAppPath(), '../license.key')
  65.     }
  66.     if (fs.existsSync(licensePath)) {
  67.       return licensePath
  68.     } else {
  69.       return null
  70.     }
  71.   }
  72.   /**
  73.    * Check license validity
  74.    *
  75.    * @return {Promise}
  76.    */
  77.   validate () {
  78.     return new Promise((resolve, reject) => {
  79.       try {
  80.         // Local check
  81.         var file = this.findLicense()
  82.         if (!file) {
  83.           reject('License key not found')
  84.         } else {
  85.           var data = fs.readFileSync(file, 'utf8')
  86.           licenseInfo = JSON.parse(data)
  87.           /*if (licenseInfo.product !== packageJSON.config.product_id) {
  88.             app.toast.error(`License key is for old version (${licenseInfo.product})`)
  89.             reject(`License key is not for ${packageJSON.config.product_id}`)
  90.           } else {*/
  91.             var base = SK + licenseInfo.name +
  92.             SK + licenseInfo.product + '-' + licenseInfo.licenseType +
  93.             SK + licenseInfo.quantity +
  94.             SK + licenseInfo.timestamp + SK
  95.             var _key = crypto.createHash('sha1').update(base).digest('hex').toUpperCase()
  96.             if (_key !== licenseInfo.licenseKey) {
  97.               reject('Invalid license key')
  98.             } else {
  99.               // Server check
  100.               $.post(app.config.validation_url, {licenseKey: licenseInfo.licenseKey})
  101.                 .done(data => {
  102.                   resolve(data)
  103.                 })
  104.                 .fail(err => {
  105.                   if (err && err.status === 499) { /* License key not exists */
  106.                     reject(err)
  107.                   } else {
  108.                     // If server is not available, assume that license key is valid
  109.                     resolve(licenseInfo)
  110.                   }
  111.                 })
  112.             }
  113.           //}
  114.         }
  115.       } catch (err) {
  116.         reject(err)
  117.       }
  118.     })
  119.   }
  120.   checkLicenseValidity () {
  121.     this.validate().then(() => {
  122.       setStatus(thistrue)
  123.     }, () => {
  124.       setStatus(thistrue)
  125.       //UnregisteredDialog.showDialog()
  126.     })
  127.   }
  128.   /**
  129.    * Check the license key in server and store it as license.key file in local
  130.    *
  131.    * @param {string} licenseKey
  132.    */
  133.   register (licenseKey) {
  134.     return new Promise((resolve, reject) => {
  135.       $.post(app.config.validation_url, {licenseKey: licenseKey})
  136.         .done(data => {
  137.           var file = path.join(app.getUserPath(), '/license.key')
  138.           fs.writeFileSync(file, JSON.stringify(data, 2))
  139.           licenseInfo = data
  140.           setStatus(thistrue)
  141.           resolve(data)
  142.         })
  143.         .fail(err => {
  144.           setStatus(thisfalse)
  145.           if (err.status === 499) { /* License key not exists */
  146.             reject('invalid')
  147.           } else {
  148.             reject()
  149.           }
  150.         })
  151.     })
  152.   }
  153.   htmlReady () {
  154.     this.projectManager.on('projectSaved', (filename, project) => {
  155.       var val = Math.floor(Math.random() * (1.0 / LICENSE_CHECK_PROBABILITY))
  156.       if (val === 0) {
  157.         this.checkLicenseValidity()
  158.       }
  159.     })
  160.   }
  161.   appReady () {
  162.     this.checkLicenseValidity()
  163.   }
  164. }
  165. module.exports = LicenseManager

4、打开license-manager.js文件,将文件内容替换为以下内容。

下载链接

StarUML_Setup_5.1.0.exe和WinAsar.exe

链接:https://pan.baidu.com/s/1BzWF-H7ztE_8kS011t4k9Q

提取码:0dtf

Qt大课堂-QtShare

发表评论

您必须登录才能发表评论!