<s> import struct <EOL> import sys <EOL> def GetExtraEoCD ( data , delta ) : <EOL> """<STR_LIT>""" <EOL> eocdoff = data . find ( "<STR_LIT>" ) <EOL> cmtlen = struct . unpack ( "<STR_LIT>" , data [ eocdoff + <NUM_LIT:5> * <NUM_LIT:4> : eocdoff + <NUM_LIT:5> * <NUM_LIT:4> + <NUM_LIT:2> ] ) [ <NUM_LIT:0> ] <EOL> eocdlen = cmtlen + <NUM_LIT:5> * <NUM_LIT:4> + <NUM_LIT:2> <EOL> eocd = data [ eocdoff : eocdoff + eocdlen + <NUM_LIT:1> ] <EOL> reloff = struct . unpack ( "<STR_LIT>" , eocd [ <NUM_LIT:3> * <NUM_LIT:4> : <NUM_LIT:3> * <NUM_LIT:4> + <NUM_LIT:4> ] ) [ <NUM_LIT:0> ] <EOL> reloff += DELTA + eocdlen <EOL> eocd = eocd [ : <NUM_LIT:3> * <NUM_LIT:4> ] + struct . pack ( "<STR_LIT>" , reloff ) + eocd [ <NUM_LIT:3> * <NUM_LIT:4> + <NUM_LIT:4> : ] <EOL> return eocd <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> fn = sys . argv [ <NUM_LIT:1> ] <EOL> DELTA = <NUM_LIT> * <NUM_LIT> <EOL> with open ( fn , "<STR_LIT:rb>" ) as f : <EOL> d = f . read ( ) <EOL> with open ( "<STR_LIT>" + fn , "<STR_LIT:wb>" ) as f : <EOL> f . write ( d + "<STR_LIT>" * DELTA + GetExtraEoCD ( d , DELTA ) ) </s>
