#!/usr/bin/env python import struct import sys import os import argparse def corrupt(block): with open(block, 'r+b') as file: # skip rev file.read(4) # go to last commit tag = 0 while True: try: ntag, = struct.unpack('