@kyanny's blog

自分の不名誉になるような考えを最初に大胆に表明することは、自立への第一歩となる - ニーチェ ドイツ哲学者

crx_unpack gem released

I released crx_unpack gem.

This gem unpacks Google Chrome extension package (crx) and extracts contents of extension from packed zip archive.

require 'crx_unpack'

data = open('extension.crx', 'rb').read
crx = CrxUnpack.unpack(data)
crx.zip #=> zip data of extension contents

# unzip extension contents into `./extension' directory
CrxUnpack.unpack_contents_from_file('extension.crx', './extension')

CRX Package Format is simple, but if you are fed up with writing code to handle the binary data, it helps you.

Feel free to report any issue and patches welcome.