Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@igor-lemon/secure-electron-license-keys-cli
Advanced tools
A CLI to create and offline license keys for your Electron apps.
A secure way to generate license keys for your Electron apps.
First, you must install the package.
> npm i secure-electron-license-keys-cli
After installing the package, you need to run the cli tool to create the license key you'll package in a given distributable.
> secure-electron-license-keys-cli # alternately, you can run "selkc"
Running the above command will create a public.key
, private.key
and license.data
. Keep the private key in a safe location.
The public.key
and license.data
[by default] you will need to put in the root of your Electron app. The secure-electron-license-keys package will attempt to decrypt the license.data
with the public.key
. If decryption with the public key succeeds, you can act as appropriate within your app (ie. deny access or allow the user to continue).
There are a number of options you can use to customize your license key generation.
Arg | Shorthand | Default | Description |
---|---|---|---|
--major | -ma | "*" | Represents the major version of your app |
--minor | -mi | "*" | Represents the minor version of your app |
--patch | -p | "*" | Represents the patch version of your app |
--user | -u | "" | Represents a unique value, tied to a user (ie. an email) |
--expire | -e | "" | A value when the license expires (ie. could be a date) |
--public | -pu | "public.key" | The name of the public key when generated |
--private | -pr | "private.key" | The name of the private key when generated |
--license | -l | "license.data" | The name of the license data file when generated |
--output | -o | process.cwd() | The path where the keys/license data file are generated to |
--private-key | -pk | null | The path to the private key |
--public-key | -pubk | null | The path to the public key |
--valid-to | -vt | null | Set the time of license valid. Patterns: years-<num> , months-<num> , days-<num> , hours-<num> , minutes-<num> , seconds-<num> |
Here are some examples of using some of the options in the command line.
> secure-electron-license-keys-cli --major "2"
> secure-electron-license-keys-cli --major "2" --expire "2022-06-05"
> secure-electron-license-keys-cli --expire "2022-12-25" --user "uniqueuseremail@account.com"
> secure-electron-license-keys-cli --expire "2022-12-25" --user "uniqueuseremail@account.com" --valid-to "months-6"
Note - you can also use the shorthand (ie.
selkc
instead ofsecure-electron-license-keys-cli
)
FAQs
A CLI to create and offline license keys for your Electron apps.
The npm package @igor-lemon/secure-electron-license-keys-cli receives a total of 0 weekly downloads. As such, @igor-lemon/secure-electron-license-keys-cli popularity was classified as not popular.
We found that @igor-lemon/secure-electron-license-keys-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.