Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gromnitsky/crx3-utils
Create CRX3 files without Chrome, extract public keys, verify signatures; cli & api
https://github.com/gromnitsky/crx3-utils
chrome-extension crx crx3
Last synced: 17 days ago
JSON representation
Create CRX3 files without Chrome, extract public keys, verify signatures; cli & api
- Host: GitHub
- URL: https://github.com/gromnitsky/crx3-utils
- Owner: gromnitsky
- Created: 2019-04-05T05:51:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T17:39:15.000Z (over 1 year ago)
- Last Synced: 2024-10-24T21:57:13.423Z (26 days ago)
- Topics: chrome-extension, crx, crx3
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# crx3-utils
https://sigwait.org/~alex/blog/2019/04/01/crx3.html
Starting with Chrome 73, Chrome changed the package format for
extensions to the CRX3 file format.$ npm -g i crx3-utils
Usage:
$ crx3-new private.pem < file.zip
The util is intentionally bare bone: it doesn't generate a private key
for you (use openssl for that) & it doesn't compress your directory
(use zip for that).Print info for a .crx downloaded from the Chome Web Store:
~~~
$ crx3-info < file.crx
id ckbpebiaofifhmkecjijobfafcfngfkj
header 1322
payload 8233
sha256_with_rsa 2 main_idx=1
sha256_with_ecdsa 1
~~~(`main_idx` is the index of AsymmetricKeyProof that contains a public
key from which the id was derived during the .crx creation.)Extract zip:
~~~
$ crx3-info < file.crx | awk '/^header/ {print $2}' \
| xargs -I% dd if=file.crx iflag=skip_bytes skip=% > file.zip
~~~Extract the 1st rsa public key:
~~~
$ crx3-info rsa 0 < file.crx
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAj/u/XDdjlDyw7gHEtaaa
sZ9GdG8WOKAyJzXd8HFrDtz2Jcuy7er7MtWvHgNDA0bwpznbI5YdZeV4UfCEsA4S
rA5b3MnWTHwA1bgbiDM+L9rrqvcadcKuOlTeN48Q0ijmhHlNFbTzvT9W0zw/GKv8
LgXAHggxtmHQ/Z9PP2QNF5O8rUHHSL4AJ6hNcEKSBVSmbbjeVm4gSXDuED5r0nwx
vRtupDxGYp8IZpP5KlExqNu1nbkPc+igCTIB6XsqijagzxewUHCdovmkb2JNtskx
/PMIEv+TvWIx2BzqGp71gSh/dV7SJ3rClvWd2xj8dtxG8FfAWDTIIi0qZXWn2Qhi
zQIDAQAB
-----END PUBLIC KEY-----
~~~Validate (returns 0 on success):
$ crx3-verify rsa 0 public.pem < file.crx
## License
MIT.