#!/usr/bin/env python3
import zipfile
import sys
import hashlib

zip_file_name = sys.argv[1]

with zipfile.ZipFile(zip_file_name, 'r') as zf:
    print(f"======== Filelisting for {zip_file_name} ========")
    for file_info in zf.filelist:
        date_time = file_info.date_time
        with zf.open(file_info) as zip_file:
            content = zip_file.read()
            md5 = hashlib.md5(content).hexdigest()
        print(f"{file_info.filename} ({file_info.file_size}) {md5} {date_time[0]}/{date_time[1]:02}/{date_time[2]:02} {date_time[3]:02}:{date_time[4]:02}:{date_time[5]:02}")
