Skip to content

Error decrypting data (Ciphertext has invalid hex encoding) #9

Open

Description

@kolsan

Hello!!

When i try to see what it is inside my syspass backup, i find that it is not working.
Please some could help me?

this is the behaviour:

admin@srv:~$ ./syspass-decrypter.phar spd:search-account --xmlpath ./syspass.xml

XML password:

xxxxxx

Master password:

xxxxxxxxxxxxxxx

[info] initialize
[info] Reading XML file "./syspass.xml"
[info] checkFile
[info] readXMLFile
[info] Encrypted XML detected
[info] Processing encrypted data
[error] Ciphertext has invalid hex encoding.
[error] #0 phar:///home/syspass-decrypter.phar/lib/SPDecrypter/Services/XmlReader/XmlParser.php(100): SPDecrypter\Services\XmlReader\XmlParser->processEncrypted()
#1 phar:///home/syspass-decrypter.phar/lib/SPDecrypter/Commands/SearchAccountCommand.php(119): SPDecrypter\Services\XmlReader\XmlParser->initialize()
#2 phar:///home/syspass-decrypter.phar/vendor/symfony/console/Command/Command.php(255): SPDecrypter\Commands\SearchAccountCommand->execute()
#3 phar:///home/syspass-decrypter.phar/vendor/symfony/console/Application.php(921): Symfony\Component\Console\Command\Command->run()
#4 phar:///home/syspass-decrypter.phar/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#5 phar:///home/syspass-decrypter.phar/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#6 phar:///home/syspass-decrypter.phar/lib/SPDecrypter/bootstrap.php(48): Symfony\Component\Console\Application->run()
#7 phar:///home/syspass-decrypter.phar/cli.php(27): require('phar:///home/ad...')
#8 /home/syspass-decrypter.phar(14): require('phar:///home/ad...')
#9 {main}
[error] Error decrypting XML data

Activity

  1. MortenVinding commented on Mar 7, 2022

    @MortenVinding

    Same problem for me.

    I tried the sysPass-XML-Decrypter and it works, but I would rather use this.

    We are in the process of switching from Keepass and the ability to make offline backups to run from a USB stick is paramount to us, sine in a all-systems-down situation we really have to have access to the password database.

    Tried to change the master password didn't help.
    Maybe some entries in our database is malformed?

  2. MortenVinding commented on Mar 8, 2022

    @MortenVinding

    Tried to change the master password didn't help. Maybe some entries in our database is malformed?

    turned out the reason was we have some password entries without a name!
    If the export/backup is without a password you can just edit the xml file and add a name for those entries:
    cat syspass.xml | sed 's:<name/>:<name>No name set</name>:g' > syspass-w-names.xml

  3. MortenVinding commented on Mar 8, 2022

    @MortenVinding

    also it might be worth mentioning that you DON'T need the master password to search the database and show the entries.
    only to decrypt the passwords.

    so if you just want to browse the database, or check your xml export, just hit enter on the master password prompt.

  4. dariox64 commented on Apr 29, 2022

    @dariox64

    Change line 138 in file /lib/SPDecrypter/Services/XmlReader/XmlParser.php

    replace $decode = Version::checkVersion($version, '320.0'); to $decode = true;

  5. kolsan commented on May 19, 2022

    @kolsan
    Author

    Thanks for your answer
    I have done the change but still not work, same error

  6. kolsan commented on May 19, 2022

    @kolsan
    Author

    also it might be worth mentioning that you DON'T need the master password to search the database and show the entries. only to decrypt the passwords.

    so if you just want to browse the database, or check your xml export, just hit enter on the master password prompt.

    Hello
    Finally you were able to solve this issue??

  7. MortenVinding commented on May 19, 2022

    @MortenVinding

    Hello Finally you were able to solve this issue??

    What?
    I did as I wrote and added names to the xml file.

  8. spisoptic commented on Mar 28, 2023

    @spisoptic

    Hi there.

    Same error here anybody has managed to make it work?

    Thanks!

  9. unodea commented on May 10, 2023

    @unodea

    no one were able to solve this issue?

  10. duven87 commented on Jul 23, 2023

    @duven87

    Change line 138 in file /lib/SPDecrypter/Services/XmlReader/XmlParser.php

    replace $decode = Version::checkVersion($version, '320.0'); to $decode = true;

    It worked for me, thank you very much
    with syspass xml decripter I have not been able to make the export... the passwords are not visible. The other things (notes, url, etc) are visible.
    This is what happens to me:
    https://gitlab.com/MagicFab/sysPass-XML-Decrypter/-/issues/2

    And this program only serves to consult? can not I export everything in a csv/xml to keepass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions