Unarchive Files with Provided Password List – macOS Instructions

archivemacos

Is there a possibility like in jDownloader, where password protected files are automatically extracted by trying all passwords one by one which are provided by the user?

Something like this:

$ unarchive foo.rar --password-list baz.txt

Best Answer

  • Get unar from http://unarchiver.c3.cx/commandline
  • Extract the archive and put unar (and lsar) somewhere your shell can find it.
  • Run

    while IFS= read pwd; do
        unar -p "$pwd" ARCHIVE
    done < password-list.txt