Skip to content

Instantly share code, notes, and snippets.

@LemonBoy
LemonBoy / unqar.py
Created November 17, 2018 18:07
Quick and dirty script to extract Quartus II .qar archives
# Quick and dirty script to extract Quartus II .qar archives
import os, sys, struct, zlib
buf = open(sys.argv[1], 'rb').read()
file_no = struct.unpack_from('<H', buf, 2)[0]
off = 4
for _ in range(file_no):
(len, unk, filename_len) = struct.unpack_from('<IHH', buf, off)