Skip to content

Instantly share code, notes, and snippets.

@ExByt3s
Forked from DrYazid/starulm.md
Created July 27, 2018 08:28
Show Gist options
  • Save ExByt3s/7ed97dae24140a462d37f8b9bb1f6ce6 to your computer and use it in GitHub Desktop.
Save ExByt3s/7ed97dae24140a462d37f8b9bb1f6ce6 to your computer and use it in GitHub Desktop.

Revisions

  1. @DrYazid DrYazid revised this gist Jun 11, 2018. No changes.
  2. @DrYazid DrYazid revised this gist Jun 11, 2018. 1 changed file with 19 additions and 10 deletions.
    29 changes: 19 additions & 10 deletions starulm.md
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,19 @@
    StarUML 3.0
    **StarUML 3.0**



    - 1- install staruml. : [staruml](http://staruml.io/)
    - 2- install node.js : [node.js](https://nodejs.org/en/download/)
    - 3- go to ...\AppData\Local\Programs\StarUML\resources
    - 4- open CMD As admin
    - 5- execute

    1- install staruml. : [staruml](http://staruml.io/) \n
    2- install node.js : [node.js](https://nodejs.org/en/download/)
    3- go to ...\AppData\Local\Programs\StarUML\resources
    4- open CMD As admin
    5- execute
    `npm install -g asar`
    `npm install -g asar`
    `asar extract app.asar app`
    6- go to app\src\engine\license-manager.js
    7- update file with Notepad

    - 6- go to app\src\engine\license-manager.js
    - 7- update file with Notepad



    @@ -58,7 +62,10 @@ validate () {



    8- and


    - 8- and




    @@ -76,7 +83,9 @@ validate () {



    9- go back to CMD and execute

    - 9- go back to CMD and execute

    `asar pack app app.asar`


  3. @DrYazid DrYazid revised this gist Jun 11, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion starulm.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    StarUML 3.0

    1- install staruml. : [staruml](http://staruml.io/)
    1- install staruml. : [staruml](http://staruml.io/) \n
    2- install node.js : [node.js](https://nodejs.org/en/download/)
    3- go to ...\AppData\Local\Programs\StarUML\resources
    4- open CMD As admin
  4. @DrYazid DrYazid revised this gist Jun 11, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion starulm.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    StarUML 3.0

    1- install staruml. : [staruml](http://staruml.io/) /b
    1- install staruml. : [staruml](http://staruml.io/)
    2- install node.js : [node.js](https://nodejs.org/en/download/)
    3- go to ...\AppData\Local\Programs\StarUML\resources
    4- open CMD As admin
  5. @DrYazid DrYazid revised this gist Jun 11, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion starulm.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    StarUML 3.0

    1- install staruml. : [staruml](http://staruml.io/)
    1- install staruml. : [staruml](http://staruml.io/) /b
    2- install node.js : [node.js](https://nodejs.org/en/download/)
    3- go to ...\AppData\Local\Programs\StarUML\resources
    4- open CMD As admin
  6. @DrYazid DrYazid created this gist Jun 11, 2018.
    85 changes: 85 additions & 0 deletions starulm.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,85 @@
    StarUML 3.0

    1- install staruml. : [staruml](http://staruml.io/)
    2- install node.js : [node.js](https://nodejs.org/en/download/)
    3- go to ...\AppData\Local\Programs\StarUML\resources
    4- open CMD As admin
    5- execute
    `npm install -g asar`
    `npm install -g asar`
    `asar extract app.asar app`
    6- go to app\src\engine\license-manager.js
    7- update file with Notepad




    ```
    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)
    var base = SK + licenseInfo.name +
    SK + licenseInfo.product + '-' + licenseInfo.licenseType +
    SK + licenseInfo.quantity +
    SK + licenseInfo.timestamp + SK
    var _key = crypto.createHash('sha1').update(base).digest('hex').toUpperCase()
    if (_key !== licenseInfo.licenseKey) {
    reject('Invalid license key')
    } else {
    // Server check
    $.post(app.config.validation_url, {licenseKey: licenseInfo.licenseKey})
    .done(data => {
    resolve(data)
    })
    .fail(err => {
    if (err && err.status === 499) { /* License key not exists */
    reject(err)
    } else {
    // If server is not available, assume that license key is valid
    resolve(licenseInfo)
    }
    })
    }
    }
    } catch (err) {
    reject(err)
    }
    })
    }
    ```




    8- and



    ```
    checkLicenseValidity () {
    this.validate().then(() => {
    setStatus(this, true)
    }, () => {
    setStatus(this, true)
    })
    }
    ```





    9- go back to CMD and execute
    `asar pack app app.asar`




    its done enjoy