Google Chrome - Alphanumeric hashes to identify extensions

后端 未结 8 718
别那么骄傲
别那么骄傲 2020-11-29 02:17

Google Chrome is using alpha numeric hashes as identifiers for the Chrome extensions. For eg. \"ajpgkpeckebdhofmmjfgcjjiiejpodla\" is the identifier for XMarks Bookmark Sync

8条回答
  •  感动是毒
    2020-11-29 02:40

    A nice little bash script for a "idiot proof" way to find out your extensions id. Thanks to A-Tuin for the oneliner command.

    #!/bin/bash
    txtred=$(tput setaf 1) # Red
    
    echo "Script to generate extension id from your extensions .pem file"
    sleep 2
    while true; do
    read -e -p "Enter local file path for your pem file " PEMFILE
    if [[ $PEMFILE != *.pem ]]; then
            echo "That is not a .pem file. Please enter a correct .pem file"
            sleep 2
    else
            break
    fi
    done
    PEMFILEGEN=`cat $PEMFILE | openssl rsa -pubout -outform DER | openssl dgst -sha256 | awk '{print $2}' | cut -c 1-32 | tr '0-9a-f' 'a-p'`
    echo "Your extension id is:${txtred} $PEMFILEGEN${textred}"
    tput sgr0
    exit 0
    

提交回复
热议问题