Python破解zip文件密码

Python破解zip文件密码


import zipfile

with zipfile.ZipFile('moon.zip', 'r') as myzip:
	for i in range(0, 10):
		for j in range(0, 1000):
			n = str( i * 1000 + j )
			try:
				myzip.extract('moon/1.jpg', '', n.encode())
				print(n)
			except:
				pass