How do directly modify a Google Chrome Extension File? .CRX – Stack Overflow

A signed CRX file has a header that will cause most/all unzippers to barf. This is not the easiest way to go about it, but heres how to do it from a bash command line.The basic idea is to find where the original unsigned zipfile begins, then copy the CRX file to a zip file but exclude the CRX header.hexdump -C the_extension.crx | moreLook in the output for the start of the zip file, which are the ASCII bytes “PK”. In the sample I tried, the PK was at offset 0x132. From reading the CRX spec, I think this number will vary from file to file because of different signature lengths. That number is what well use in the next step.dd if=the_extension.crx of=the_extension.zip bs=1 skip=0x132 For the skip parameter, substitute the offset you found in the previous step.Now unzip the .zip that you just created.Fiddle with the files in the unzipped directory, then either install the unsigned/unpacked extension into your Chrome installation, or else repackage it just as you would any other Chrome extension.Im sure that there is a more concise way to do this. Bash experts, please improve on my answer.share|improve this answeranswered Dec 20 10 at 20:38sowbug1,271513Great hint! My PK offset was also 0x132 – Stefan Schmidt Aug 15 12 at 21:371  I was actually able to unzip it with the command line utility unzip. It complained about the additional 306 bytes of the header, but did it anyway. – Lexi R Sep 12 12 at 20:04

via How do directly modify a Google Chrome Extension File? .CRX – Stack Overflow.


Yayımlandı

kategorisi

yazarı:

Etiketler: