blob: 81b8f6e73666c50ca2bd1c2bb128f078e1cd294b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
sys.path.append("../")
import tempfile
from ZipFileTransformer import Zip
input_file = "./samples/test1.zip"
output_file = tempfile.mktemp()
print("Output: " + output_file)
z = Zip(input_file)
a = bytearray(b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
b = bytearray(b'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB')
z.add_data_to_file(a, b, False)
g = open(output_file, "wb")
g.write(a + z.get_local_file_data() + b + z.get_data_after_central_directory())
g.close()
|