Need help figuring out how to decrypt a 7z archive I encrypted using the command line

Help
XJDHDR
2014-06-08
2014-09-24
  • XJDHDR
    XJDHDR
    2014-06-08

    Greetings

    I have some 7z archives that I encrypted using the following password:
    8VTqRX.{%yM'mBQHJKLD}Zk[j-KAs8i2bAqNTE0FX@g^moJtY9OMQ$~'[k=._`NL]]Xn1QlG%P2Fk%5#YlJCDIwk',tvf-.O.[:P=9[
    I also used the command line to create these archives (i.e. 7z -p{password}). I am using 7z v9.25 alpha.

    Unfortunately, I recently discovered that I am not able to open these archives using this password. I get an error saying "Data error in encrypted file 'XXX'. Wrong password?"

    Some testing I have done shows that creating an archive with this password using the GUI creates an archive that I can decrypt. However, if I use the command line, the result is an archive I can't extract even though there were no error messages.

    Can anyone please help me retrieve the data that I have stored in some of these archives? Help will be greatly appreciated.

    Kind regards

     
    • fernando
      fernando
      2014-06-12

      enclose your password in quote marks...

      e.g.,

      7z a archive -p"8VTqRX.{%yM'mBQHJKLD}Zk[j-KAs8i2bAqNTE0FX@g^moJtY9OMQ$~'[k=._`NL]]Xn1QlG%P2Fk%5#YlJCDIwk',tvf-.O.[:P=9[" 
      
      7z l archive.7z -p"8VTqRX.{%yM'mBQHJKLD}Zk[j-KAs8i2bAqNTE0FX@g^moJtY9OMQ$~'[k=._`NL]]Xn1QlG%P2Fk%5#YlJCDIwk',tvf-.O.[:P=9["
      

      or do not use poison characters in password.

       
      • XJDHDR
        XJDHDR
        2014-06-14

        Thank you for the help. I have changed the password I'm using so that it no longer contains poison characters.

        Unfortunately, I have a few archives that I need to retrieve the files from that were encrypted using that password. So I guess what I need to know is ultimately:
        Which characters causes problems when used in the command line?
        What are the effects of using these characters?

         
        Last edit: XJDHDR 2014-06-14
  • Igor Pavlov
    Igor Pavlov
    2014-06-09

    try both things:
    1) use command line to extract
    2) remove escape character '^' from password in GUI or command line.

     
  • XJDHDR
    XJDHDR
    2014-06-11

    Thank you for the reply Igor. Unfortunately, your suggestions didn't work. I also tried the password without the escape character as well as everything afterwards but that didn't work either.

     
  • Igor Pavlov
    Igor Pavlov
    2014-06-15

    Try command:

    echo 8VTqRX.{%yM'mBQHJKLD}Zk[j-KAs8i2bAqNTE0FX@g^moJtY9OMQ$~'[k=._`NL]]Xn1QlG%P2Fk%5#YlJCDIwk',tvf-.O.[:P=9[ > pass2.txt
    

    then compare pass2.txt with file pass1.txt that contains original password.

     
  • XJDHDR
    XJDHDR
    2014-09-24

    After a lot of time spent working on this, I eventually decided to go through my backups and discovered that all of the files that were in the encrypted archives were present in the backups. Hence, I no longer need to find out how to recover the contents of those archives. Again, thanks for the help that was provided.

    On a side note, I discovered that the ^ is not the only character that was causing problems. % is treated by Windows as a variable and replaces the variable name with the contents of said variable. I had three % in the password and so windows treated %yM'mBQHJKLD}Zk[j-KAs8i2bAqNTE0FX@g^moJtY9OMQ$~'[k=._`NL]]Xn1QlG% and %5 as two variables. Since I hadn't assigned a value to these variables, the variables were simply removed from the password.

    I managed to work out that the password being supplied to 7-zip was 8VTqRX.{P2Fk#YlJCDIwk',tvf-.O.[:P=9[ yet this didn't work either, for some reason.