Skip to content

Instantly share code, notes, and snippets.

@noromanba
Last active November 27, 2023 03:46
Show Gist options
  • Save noromanba/5776183 to your computer and use it in GitHub Desktop.
Save noromanba/5776183 to your computer and use it in GitHub Desktop.
download and locate Chrome Extension file 'crx'

Inspect crx location on Chrome Web Store

crx are src-file of Chrome Extension, those name like this;

novell-moonlight-3.99.0.3-i586.crx

find out *.crx URL and download

Bookmarklet

for Google Web Store

copy download URL after execute Bookmarklet


Background

load to Bookmarklet

e.g. Go Extensions

entry point

https://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc&prodversion=32

inspect

decode query parameters

decodeURIComponent('https://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc&prodversion=32')
/* ->
https://clients2.google.com/service/update2/crx?response=redirect&x=id=cdlogpoaigpjcfjfllhjdaniobkjnkmg&uc&prodversion=32
*/

and

~/.config/chromium/Default/Extensions/<EXTENSION_ID>/<VERSION>/manifest.json

parameters

mean param note
update_url https://clients2.google.com/service/update2/crx from manifest.json
redirect response=redirect
execute x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc %3D "=" %26 "&"
language lang=en-US
prodversion 32 32 or higher e.g. 33, 64
product prod=chrome OBSOLETE

part of id uc, it's means probably User Contents

canonical

update_url + redirect + EXTENSION_ID + prodversion

https://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc

i.e.

canonical URL is;

'https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D' + id + '%26uc' + '&prodversion=' + prodversion

APPENDIX

resolve URL

  1. http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc
  2. https://clients2.googleusercontent.com/crx/blobs/OQAAABoPIj_5thuifVo6bmPkF7p2Vrq7ZFgx-bQzdvImRjug7tBuCqolnEUZGIpjdWYFRo_06Iw-AXXVtlyZQHx3EekAxlKa5V2JoWVIQNBSlTAK8DJlN7JkRMIi/extension_0_1.crx

needs https

wget spy

can not use --spider, if use this option;

$ wget --no-check-certificate --spider CRX_URL
Spider mode enabled. Check if remote file exists.
--2013-06-14 01:59:46-- CRX_URL
Resolving clients2.google.com (clients2.google.com)... 74.125.235.231, 74.125.235.230, 74.125.235.227, ...
Connecting to clients2.google.com (clients2.google.com)|74.125.235.231|:80... connected.
HTTP request sent, awaiting response... 413 Request Entity Too Large
Remote file does not exist -- broken link!!!

413 Request Entity Too Large

--spider shim

like this;

$ wget -O - URL > /dev/null
  • DL files: STDOUT -> /dev/null
  • messages: msg to STDERR (wget default)

log

$ wget --no-check-certificate -O - "http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc" > /dev/null
--2013-06-14 01:45:37--  http://clients2.google.com/service/update2/crx?response=redirect&x=id%3Dcdlogpoaigpjcfjfllhjdaniobkjnkmg%26uc
Resolving clients2.google.com (clients2.google.com)... 74.125.235.197, 74.125.235.198, 74.125.235.206, ...
Connecting to clients2.google.com (clients2.google.com)|74.125.235.197|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://clients2.googleusercontent.com/crx/blobs/OQAAABoPIj_5thuifVo6bmPkF7p2Vrq7ZFgx-bQzdvImRjug7tBuCqolnEUZGIpjdWYFRo_06Iw-AXXVtlyZQHx3EekAxlKa5V2JoWVIQNBSlTAK8DJlN7JkRMIi/extension_0_1.crx [following]
--2013-06-14 01:45:38--  https://clients2.googleusercontent.com/crx/blobs/OQAAABoPIj_5thuifVo6bmPkF7p2Vrq7ZFgx-bQzdvImRjug7tBuCqolnEUZGIpjdWYFRo_06Iw-AXXVtlyZQHx3EekAxlKa5V2JoWVIQNBSlTAK8DJlN7JkRMIi/extension_0_1.crx
Resolving clients2.googleusercontent.com (clients2.googleusercontent.com)... 74.125.235.203, 74.125.235.202, 74.125.235.204
Connecting to clients2.googleusercontent.com (clients2.googleusercontent.com)|74.125.235.203|:443... connected.
WARNING: The certificate of `clients2.googleusercontent.com' is not trusted.
WARNING: The certificate of `clients2.googleusercontent.com' hasn't got a known issuer.
HTTP request sent, awaiting response... 200 OK
Length: 36159 (35K) [application/x-chrome-extension]
Saving to: `STDOUT'

100%[===============================================================================================================>] 36,159       151K/s   in 0.2s    

2013-06-14 01:45:39 (151 KB/s) - written to stdout [36159/36159]

$ 

c.f.

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