Sharath
Sharath

Reputation: 57

Is there any command line code which can help me verify passwords for files within zip files?

I have about 200 zip files and I need to verify the password for each of the zip files. Is there any command line code which can help me verify passwords for files within these zip files?

Upvotes: 0

Views: 95

Answers (1)

Fedor Dikarev
Fedor Dikarev

Reputation: 506

pass="testpassword"
for arch in *.zip; do
  unzip -P $pass -qq -t "$arch" && echo "Pass $pass for $arch"
done

Upvotes: 1

Related Questions