Dependency: p7zip GNU package.
#!/bin/bash
# @(#) p7crack -- Password crack a target 7z file
# Usage: ./p7crack.sh <target_file>
declare -a LIST=(password1 password2 password3)
for x in ${LIST[@]); do
7z x ${1} -p${x}
if [ $? -eq 0 ]; then
echo "${x} is the password"
fi
done