Last active
July 9, 2018 19:39
-
-
Save specious/8239900 to your computer and use it in GitHub Desktop.
Downloads a Google Chrome extension or app from the Chrome Web Store and saves it as a file. You can then unzip the .crx file to see the source code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
echo Downloads a Google Chrome extension from the Chrome Web Store and saves it as a file. | |
echo You can then unzip the .crx file to see the source code. | |
echo | |
echo For example, if the URL is: | |
echo https://chrome.google.com/webstore/detail/tile-view/ajcjkemninihecbgljahanflndoeggao | |
echo | |
echo Then the extension id is: ajcjkemninihecbgljahanflndoeggao | |
echo | |
echo "Usage: $0 <extension-id>" | |
exit 1 | |
fi | |
ID=$1 | |
URL="https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D$ID%26uc&prodversion=32" | |
echo -e "URL => $URL" | |
curl -o $ID.crx $URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment