I needed another tool besides JTR. It's a python script called 7z2john.py by PyLZMA Copyright (C) 2004-2010 Joachim Bauch under the GNU LESSER GENERAL PUBLIC LICENSE. You can Google it: https://www.google.com.co/#q=7z2john.py or clone the repository through git:
- git clone https://bitbucket.org/dhiru/pylzma-ng.git
To extract the hash of the compressed file just execute the python script:
- ./7z2john.py archive.7z > hash.txt
Finally use the output of the python script as a input file for JTR.
This attack is only possible when you have a few list of words and the certainty that they are correct, because the AES encryption used by 7z implements protection against bruteforce attacks. It's a extremely slow process, in my laptop 193 passwords took it 8 seconds.