Skip to content

Instantly share code, notes, and snippets.

@trandaison
Last active June 1, 2024 15:57
Show Gist options
  • Save trandaison/40b1d83618ae8e3d2da59df8c395093a to your computer and use it in GitHub Desktop.
Save trandaison/40b1d83618ae8e3d2da59df8c395093a to your computer and use it in GitHub Desktop.
Get full version of StarUML

Note: This is the guide for v 2.x.

For the v3, please follow this url: https://blog.csdn.net/sam_shan/article/details/80585240 Thanks @liy-cn for contributing.

StarUML

Download: StarUML.io

Crack

Source: jorgeancal

After installing StartUML successfully, modify LicenseManagerDomain.js as follow:

/**
 * File name: LicenseManagerDomain.js
 * Mac OS: /Applications/StarUML.app/Contents/www/license/node/
 * Linux: /opt/staruml/www/license/node/
 */

(function () {
    "use strict";
 
    var NodeRSA = require('node-rsa');
 
    function validate(PK, name, product, licenseKey) {
        return{
           name: "sontd",
           product: "StarUML",
           licenseType: "vip",
           quantity: "unlimited",
           licenseKey: "no, thanks!"
        };
    }
 
    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;
 
}());

Now, open it and go to Help > Enter License and you have to write the name and the licence key which you have written on LicenseManagerDomain.js. In this example would be the next:

name: "sontd"
License Key: "no, thanks!"

Enjoy it!

@haghverdimasoud
Copy link

I install the last version of staruml (v4.1.6) on windows 10, and can not find LicenseManagerDomain.js
how can i crack it?

@EZaykov
Copy link

EZaykov commented Mar 15, 2022

for windows users and latest versions:

  1. install an app from official website.

  2. install "asar" in node: "npm i asar -g"

  3. go to "ProgramFiles/StarUML/resources" and run "asar e app.asar app" (i was running all commands via bash from git package, not via powershell or cmd, but u can try).

  4. go to "ProgramFiles/StarUML/resources/app/src/engine and open "license-manager.js" file.

  5. edit code as shown on screenshot and save changes
    91382611603427377c54c968a5f5aaeb

  6. run "asar pack app app.asar" (at "ProgramFiles/StarUML/resources")

  7. remove src files (app folder) (at "ProgramFiles/StarUML/resources")

  8. enjoy! (run an .exe file in "ProgramFiles/StarUML" or desktop shortcut)

(didnt get any user rights issues on my os. i hope u can fix them urself)

@vortex14
Copy link

Thank you !

@Kelopsz
Copy link

Kelopsz commented May 15, 2022

Thanks! It works with 5.0.1

@fernand0albert0
Copy link

muchas gracias por compartir esta informacion... resulto muy valiosa

@panoet
Copy link

panoet commented May 28, 2022

This worked. Thank you.

@Anis-Dhaoui
Copy link

for the latest version: 5.0.2 (till now) Follow this link https://gist.github.com/jjvillavicencio/4e3615a8219bb1a17c81c4541c6c317d

@deronparker
Copy link

This worked for me on v5.0.1 (Linux).

  • All commands were run as root
  • Probably should have StarUML closed during this process
  • I recommend backing up your StarUML directory
  1. Install asar via npm
npm i asar -g
  1. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
  1. Edit license-manager.js
<text_editor> app/src/engine/license-manager.js

Change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
    // if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    // } else {
    //   this.validate().then(() => {
    //     setStatus(this, true)
    //   }, () => {
    //     setStatus(this, false)
    //     UnregisteredDialog.showDialog()
    //   })
    // }
  }
  1. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.

Source

@jebcarlos
Copy link

Gracias tambien funciona con StarUml 5.0.2 solo que las lineas a modificar son desde la 131. Eso si hay que seguir los pasos como dice el sitio

@hid0
Copy link

hid0 commented Nov 13, 2022

This worked for me on v5.0.1 (Linux).

* All commands were run as root

* Probably should have StarUML closed during this process

* I recommend backing up your StarUML directory


1. Install `asar` via `npm`
npm i asar -g
2. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
3. Edit `license-manager.js`
<text_editor> app/src/engine/license-manager.js

Change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
    // if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    // } else {
    //   this.validate().then(() => {
    //     setStatus(this, true)
    //   }, () => {
    //     setStatus(this, false)
    //     UnregisteredDialog.showDialog()
    //   })
    // }
  }
4. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.

Source

this is worked in MacOS Big Sur
thanks bro

@jokosaputro95
Copy link

I've done this on macOS Catalina, it doesn't seem to work well, because after repackaging and running the application a notification appears STAR UMML is damage and can't be openend and the options are only move to trash and cancel

@ssohans
Copy link

ssohans commented Nov 29, 2022 via email

@jokosaputro95
Copy link

it doesn't work properly when I try to run it on MacOS Catalina

@badr-elmazaz
Copy link

This worked for me on v5.0.1 (Linux).

* All commands were run as root

* Probably should have StarUML closed during this process

* I recommend backing up your StarUML directory


1. Install `asar` via `npm`
npm i asar -g
2. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
3. Edit `license-manager.js`
<text_editor> app/src/engine/license-manager.js

Change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
    // if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    // } else {
    //   this.validate().then(() => {
    //     setStatus(this, true)
    //   }, () => {
    //     setStatus(this, false)
    //     UnregisteredDialog.showDialog()
    //   })
    // }
  }
4. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.
Source

this is worked in MacOS Big Sur thanks bro

Thanks this worked also on Windows 10

@deronparker
Copy link

deronparker commented Feb 6, 2023

An update from my initial post.

This worked for me on v5.0.1 v5.1.0 (Linux).

  1. Install asar via npm
npm i asar -g
  1. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
  1. Edit src/engine/license-manager.js

change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
      setStatus(this, true)
  }

and this

  register (licenseKey) {
    return new Promise((resolve, reject) => {
      $.post(app.config.validation_url, {licenseKey: licenseKey})
        .done(data => {
          if (data.product === packageJSON.config.product_id) {
            var file = path.join(app.getUserPath(), '/license.key')
            fs.writeFileSync(file, JSON.stringify(data, 2))
            licenseInfo = data
            setStatus(this, true)
            resolve(data)
          } else {
            setStatus(this, false)
            reject('unmatched') /* License is for old version */
          }
        })
        .fail(err => {
          setStatus(this, false)
          if (err.status === 499) { /* License key not exists */
            reject('invalid')
          } else {
            reject()
          }
        })
    })
  }

to this

  register (licenseKey) {
    return new Promise(() => { setStatus(this, false) })
  }

  1. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.

Source (Nonfunctional as of this post)
Source on Wayback
Original Post

@deronparker
Copy link

This page has been saved in the Wayback Machine

@joseph19993d
Copy link

Any for windows ?

@deronparker
Copy link

@joseph19993d, asar is an npm package, so I think you should still be able to get it on Windows; thus, the process should be similar to above

You would just have to find where StarUML is installed on Windows.

@what0o0
Copy link

what0o0 commented Aug 31, 2023

An update from my initial post.

This worked for me on v5.0.1 v5.1.0 (Linux).

  • All commands were run as root
  • You may need to run commands as root if your StarUML directory is not owned by your user
  • Probably should have StarUML closed during this process
  • I recommend backing up your StarUML directory
  1. Install asar via npm
npm i asar -g
  1. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
  1. Edit src/engine/license-manager.js

change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
      setStatus(this, true)
  }

and this

  register (licenseKey) {
    return new Promise((resolve, reject) => {
      $.post(app.config.validation_url, {licenseKey: licenseKey})
        .done(data => {
          if (data.product === packageJSON.config.product_id) {
            var file = path.join(app.getUserPath(), '/license.key')
            fs.writeFileSync(file, JSON.stringify(data, 2))
            licenseInfo = data
            setStatus(this, true)
            resolve(data)
          } else {
            setStatus(this, false)
            reject('unmatched') /* License is for old version */
          }
        })
        .fail(err => {
          setStatus(this, false)
          if (err.status === 499) { /* License key not exists */
            reject('invalid')
          } else {
            reject()
          }
        })
    })
  }

to this

  register (licenseKey) {
    return new Promise(() => { setStatus(this, false) })
  }
  1. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.

Source (Nonfunctional as of this post) Source on Wayback Original Post

checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to

checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, true)
      })
    }
  }

This worked for me on v5.1.0 by Windows 11

@lvlanh912
Copy link

thanks you, it worked for me on Windows 10

@fefebrians
Copy link

This file LicenseManagerDomain.js didn't came after my StarUML installing 4.1.6. as well as the www folder. I did the StarUML install through sudo dpkg -i (StarUML.deb file), I already try to create a new folder: www with the LicenseManagerDomain.js file on it but when I try to insert the license key no success, I would like to know how could I solve it? My OS is Ubuntu 20.04

it is true ,last i try this , but not work

@KresnaB
Copy link

KresnaB commented Dec 23, 2023

An update from my initial post.
This worked for me on v5.0.1 v5.1.0 (Linux).

  • All commands were run as root
  • You may need to run commands as root if your StarUML directory is not owned by your user
  • Probably should have StarUML closed during this process
  • I recommend backing up your StarUML directory
  1. Install asar via npm
npm i asar -g
  1. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
  1. Edit src/engine/license-manager.js

change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
      setStatus(this, true)
  }

and this

  register (licenseKey) {
    return new Promise((resolve, reject) => {
      $.post(app.config.validation_url, {licenseKey: licenseKey})
        .done(data => {
          if (data.product === packageJSON.config.product_id) {
            var file = path.join(app.getUserPath(), '/license.key')
            fs.writeFileSync(file, JSON.stringify(data, 2))
            licenseInfo = data
            setStatus(this, true)
            resolve(data)
          } else {
            setStatus(this, false)
            reject('unmatched') /* License is for old version */
          }
        })
        .fail(err => {
          setStatus(this, false)
          if (err.status === 499) { /* License key not exists */
            reject('invalid')
          } else {
            reject()
          }
        })
    })
  }

to this

  register (licenseKey) {
    return new Promise(() => { setStatus(this, false) })
  }
  1. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.
Source (Nonfunctional as of this post) Source on Wayback Original Post

checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to

checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, true)
      })
    }
  }

This work for 6.0.1, but i can't export the diagram. I recommend using 5.1.0

@samonysh
Copy link

samonysh commented Apr 8, 2024

An update from my initial post.
This worked for me on v5.0.1 v5.1.0 (Linux).

  • All commands were run as root
  • You may need to run commands as root if your StarUML directory is not owned by your user
  • Probably should have StarUML closed during this process
  • I recommend backing up your StarUML directory
  1. Install asar via npm
npm i asar -g
  1. Extract source
cd <path_to_staruml>/resources/ # mine was /opt/StarUML/resources/
asar extract app.asar app
  1. Edit src/engine/license-manager.js

change this

  checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to this

  checkLicenseValidity () {
      setStatus(this, true)
  }

and this

  register (licenseKey) {
    return new Promise((resolve, reject) => {
      $.post(app.config.validation_url, {licenseKey: licenseKey})
        .done(data => {
          if (data.product === packageJSON.config.product_id) {
            var file = path.join(app.getUserPath(), '/license.key')
            fs.writeFileSync(file, JSON.stringify(data, 2))
            licenseInfo = data
            setStatus(this, true)
            resolve(data)
          } else {
            setStatus(this, false)
            reject('unmatched') /* License is for old version */
          }
        })
        .fail(err => {
          setStatus(this, false)
          if (err.status === 499) { /* License key not exists */
            reject('invalid')
          } else {
            reject()
          }
        })
    })
  }

to this

  register (licenseKey) {
    return new Promise(() => { setStatus(this, false) })
  }
  1. Repackage app
asar pack app app.asar

Next time you run StarUML, it should behave as a licensed version.
Source (Nonfunctional as of this post) Source on Wayback Original Post

checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, false)
        UnregisteredDialog.showDialog()
      })
    }
  }

to

checkLicenseValidity () {
    if (packageJSON.config.setappBuild) {
      setStatus(this, true)
    } else {
      this.validate().then(() => {
        setStatus(this, true)
      }, () => {
        setStatus(this, true)
      })
    }
  }

This work for 6.0.1, but i can't export the diagram. I recommend using 5.1.0

If you want to export the diagram, you also need to edit src/engine/diagram-export.js.
You should comment these codes below the comment // Draw watermark if application is not registered, beacuse there is a problem occored when checking license.

@rachistan
Copy link

Thanks buddy it worked

@korovkaK22
Copy link

@EZaykov
Thanks a lot! 6.0.1 still working

@h-chayma
Copy link

@EZaykov
Thanks a lot! 6.1.0 and still working

@arthiccc
Copy link

arthiccc commented May 2, 2024

@phgnam
Copy link

phgnam commented May 4, 2024

macOS Sonoma with version 6.1.0 still working
path /Applications/StarUML.app/Contents/Resources
https://gist.github.com/trandaison/40b1d83618ae8e3d2da59df8c395093a?permalink_comment_id=5016455#gistcomment-5016455

@gochi20
Copy link

gochi20 commented May 7, 2024

currently 6.1.0 is working but i cant export a diagram

@fedpo2
Copy link

fedpo2 commented May 23, 2024

imagen
shows this error when trying to export to pdf.

on debian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment