Hello Gophers! I am trying to open a chrome extension file to read its manifest.json. It is a zip file with a .crx extension. When I unzip via command line it works like a charm. But, if I try with golang using package archive/zip it gives me the "zip: not a valid zip file" error. It's not the first time I use this package and it always worked fine, including working with Libre Office documents (.odt). I checked with the "file" command and with "od -c | head" commands and realized that the Chrome Extensions files differ in the magic bytes:
The regular zip file: vuco@azrael ~/Documents $ od -c ./root/prms-minuano.zip | head -n 1 0000000 P K 003 004 024 \0 \0 \0 \b \0 016 210 0 @ 034 255 vuco@azrael ~/Documents $ file ./root/prms-minuano.zip ./root/prms-minuano.zip: Zip archive data, at least v2.0 to extract The odt file: vuco@azrael ~/Documents $ od -c ./mpf/v1.ProjetoIntegracao.odt | head -n 1 0000000 P K 003 004 024 \0 \0 \b \0 \0 256 y 026 ? ^ 306 vuco@azrael ~/Documents $ file ./mpf/v1.ProjetoIntegracao.odt ./mpf/v1.ProjetoIntegracao.odt: OpenDocument Text The crx file: sherlock@asspadev ~/work/download $ od -c lestrade.crx | head -n 1 0000000 C r 2 4 002 \0 \0 \0 & 001 \0 \0 \0 001 \0 \0 sherlock@asspadev ~/work/download $ file lestrade.crx lestrade.crx: data Any suggestions on how to open the file? Thank you in advance Luis Otavio de Colla Furquim -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.