StarUML3.1 For Mac Crack

破解前提

  1. 安装StarUML 3.1
  2. 安装nodejs
  3. 安装npm

安装asar

1
npm install asar -g

如果权限不够, 可以添加前缀sudo执行.

1
sudo npm install asar -g

解压app.asar

1
2
cd /Applications/StarUML.app/Contents/Resources/
asar extract app.asar app

替换代码

替换下面脚本中的代码块

1
/Applications/StarUML.app/Contents/Resources/app/src/engine/license-manager.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
* Copyright (c) 2013-2014 Minkyu Lee. All rights reserved.
*
* NOTICE: All information contained herein is, and remains the
* property of Minkyu Lee. The intellectual and technical concepts
* contained herein are proprietary to Minkyu Lee and may be covered
* by Republic of Korea and Foreign Patents, patents in process,
* and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Minkyu Lee (niklaus.lee@gmail.com).
*
*/

const {EventEmitter} = require('events')
const fs = require('fs')
const path = require('path')
const crypto = require('crypto')
const UnregisteredDialog = require('../dialogs/unregistered-dialog')
const SK = 'DF9B72CC966FBE3A46F99858C5AEE'

// Check License When File Save
const LICENSE_CHECK_PROBABILITY = 0.3

var status = false
var licenseInfo = null

/**
* Set Registration Status
* This function is out of LicenseManager class for the security reason
* (To disable changing License status by API)
* @private
* @param {boolean} newStat
* @return {string}
*/
function setStatus (licenseManager, newStat) {
if (status !== newStat) {
status = newStat
licenseManager.emit('statusChanged', status)
}
}

/**
* @private
*/
class LicenseManager extends EventEmitter {

constructor () {
super()
this.projectManager = null
}

/**
* Get Registration Status
* @return {string}
*/
getStatus () {
return status
}

/**
* Get License Infomation
* @return {Object}
*/
getLicenseInfo () {
return licenseInfo
}

findLicense () {
var licensePath = path.join(app.getUserPath(), '/license.key')
if (!fs.existsSync(licensePath)) {
licensePath = path.join(app.getAppPath(), '../license.key')
}
if (fs.existsSync(licensePath)) {
return licensePath
} else {
return null
}
}

/**
* Check license validity
*
* @return {Promise}
*/
validate () {
return new Promise((resolve, reject) => {
try {
// Local check
var file = this.findLicense()
if (!file) {
reject('License key not found')
} else {
var data = fs.readFileSync(file, 'utf8')
licenseInfo = JSON.parse(data)
resolve(licenseInfo)
}
} catch (err) {
reject(err)
}
})
}

checkLicenseValidity () {
this.validate().then(() => {
setStatus(this, true)
}, () => {
setStatus(this, false)
UnregisteredDialog.showDialog()
})
}

/**
* Check the license key in server and store it as license.key file in local
*
* @param {string} licenseKey
*/
register (licenseKey) {
return new Promise((resolve, reject) => {
var data = {
name: "Reborn",
product: "Reborn product",
licenseType: "PS",
quantity: "Reborn Quantity",
timestamp: "1529049036",
licenseKey: "It's Cracked!!",
crackedAuthor: "Reborn"
}
var file = path.join(app.getUserPath(), '/license.key')
fs.writeFileSync(file, JSON.stringify(data, 2))
licenseInfo = data
setStatus(this, true)
resolve(data)
})
}

htmlReady () {
this.projectManager.on('projectSaved', (filename, project) => {
var val = Math.floor(Math.random() * (1.0 / LICENSE_CHECK_PROBABILITY))
if (val === 0) {
this.checkLicenseValidity()
}
})
}

appReady () {
this.checkLicenseValidity()
}

}

module.exports = LicenseManager

打包app

1
2
cd /Applications/StarUML.app/Contents/Resources
asar pack app app.asar

至此,破解结束。

后续补充

如果在打开app的时候, 遇到已损坏情况. 可以输入以下命令

1
sudo spctl --master-disable