MrC's Convert to 1Password Utility (mrc-converter-suite)

Options
1404143454652

Comments

  • MrC
    MrC
    Volunteer Moderator
    Options

    @Jul / @Flip76

    Can you both send me an email, and I'll work with you individually offline for these. My email is at the top of the convert_to_1p4.pl script.

    @Jul - I'll make a quick fix that should resolve the issue, but I would like to know how to recreate the data that is causing the issue. Currently my test data works fine.

    @Flip76 - I'l describe as much as you need.

  • Flip76
    Flip76
    Community Member
    Options

    Hi @MrC

    thank you so much for your outstanding support. With your help I was able to import all my data (>800 entries) from Enpass to 1Password successfully.

    Best regards,
    Flip

  • marc_laederach
    marc_laederach
    Community Member
    Options

    Hi @MrC

    The fix that you provided for me works great, I was finally able to export to HTML and from there on to save as PDF.
    Thank you so much for your effort!

    Kind Regards
    Marc

  • MrC
    MrC
    Volunteer Moderator
    Options

    At long last, I'm promoting version 1.10 to Stable Bits. Apologies to all for the length of time this has taken me. I was both very busy, and wanted to be sure the changes I've made had adequate feedback, especially the targeted fixes for individuals.

    Thanks to all for your testing and feedback.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @MrC: Hey, 1.10 is epic. It's worth the wait. Thanks for all you do! <3

  • tylergarcia
    tylergarcia
    Community Member
    Options

    Hey @MrC

    Hopefully this hasn't already been covered in a previous post.

    When I run the utility (1.10) from the script or from the command line, I'm told "Failed to decrypt the keychain - did you supply the correct password?" I know the password is correct because I created a brand new local keychain to put my iCloud items in, and can unlock it from Keychain Access without issue. Any ideas?

    Thanks so much

    TG

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @tylergarcia ,

    I don't know of any issues pending that would cause this, so we'll have to try to figure it out together.

    Which version of macOS is this?

    Where did you store the new keychain, and do you know its full path including the keychain suffix?

    Are there other keychains in the list presented by the applescript helper that appear similar (and might you be selecting the wrong one)?

    I may have to give you a special version of the keychain converter with some debugging enabled so that we can determine the cause.

  • tylergarcia
    tylergarcia
    Community Member
    Options

    Hi @MrC

    macOS 10.12.6

    Tried the new keychain FIRST on the desktop and then in the keychains folder.

    The only other keychain displayed is the login keychain, and I tried it as well with the same issue.

    Thanks so much.

    TG

  • MrC
    MrC
    Volunteer Moderator
    Options

    I'll have to recreate a 10.12 environment to see if I can replicate the issue, @tylergarcia . This might be a tough one, since I'm working blind and the debugging aids I can put into the converter may be insufficient.

    At the risk of stating the obvious, be sure you are using the correct password, with the correct case, etc. I presume you don't have any atypical password characters outside the usual ASCII character set (typing in the command shell requires special setup for this).

  • tylergarcia
    tylergarcia
    Community Member
    Options

    @MrC

    Password is as standard as can be, only numbers and letters. In an attempt to try and work around this myself I put my password in plaintext in Keychain.pm in chomp($password = password) to see if it was an input issue and I got the same error. I'm no expert at this so that may not actually have told us anything new but there we go.

    Thanks again!

  • MrC
    MrC
    Volunteer Moderator
    Options

    @tylergarcia ,

    I've posted a Keychain.pm file to Testing Bits. Please take that file, and replace your desktop's convert_to_1p4/Converters/Keychain.pm file and re-run the converter. Let's see if this resolves the issue for you.

  • tylergarcia
    tylergarcia
    Community Member
    Options

    @MrC

    It worked! I can't thank you enough. Where is your PayPal/community support page? Also curious to know what fixed it, not that I'm likely to understand.

    TG

  • MrC
    MrC
    Volunteer Moderator
    edited June 2018
    Options

    @tylergarcia ,

    Your Thanks is sufficient payment.

    The issue was due to an intolerance in the decryption Key length in older OpenSSL versions.

    The keychain converter relies on the installed version of OpenSSL to do the decryption. I suspected you were on an older version of macOS, and I had not tested this converter on older versions. Furthermore, I was not handling the decryption error returned by OpenSSL very well in this situation, since I had not encountered it while testing.

    The keychain converter alternatively will prefer to use an installed Perl module to do the decryption, but almost no users will have this module installed, and getting it installed is difficult for users. It, however, is more consistent across macOS releases, and was the primary engine I originally used for developing this converter. OpenSSL is challenging, to say the least, but is available.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    The issue was due to an intolerance in the decryption Key length in older OpenSSL versions.

    @MrC: Holy cow! I never would have caught that. Thanks for all you do! :chuffed: :+1:

  • heavymark
    heavymark
    Community Member
    Options

    Does this support the lates macOS Mojave? Ran into issues each step of the way, including simply copying a login item from iCloud to local-icloud. Copying one or many resulted in: An error has occurred. Unable to add an item to the current keychain. One or more parameters passed to a function were not valid. Was curios if anyone has been successful using Mojave or if it hasn't been updated for that yet? To note, this may have been answered here already but since there are 43 pages here and no helpful search feature that I can see, thought I'd ask here.

  • MrC
    MrC
    Volunteer Moderator
    Options

    @heavymark ,

    These sorts of issues started occurring several macOS releases ago, increasing each release, and have now become the rule rather than the exception. Sierra created many problems obtaining keychain data, High Sierra added to those, including the error you are experiencing now copying iCloud data to a local keychain. The difficulty of exporting data got so bad, I threw out the old method using the security command, and replaced it with a raw keychain decoder. That doesn’t help iCloud users, however.

    I have not yet tried Mojave, but presume it will be equally difficult or impossible to copy iCloud keychain data.

  • matan
    matan
    Community Member
    Options

    Hey @MrC!
    Can you do something like this script to handle iCloud Keychain?
    https://github.com/PaperKup/csv-toicloudkeychain

  • MrC
    MrC
    Volunteer Moderator
    Options

    @matan,

    By "to handle" - you mean convert from CSV into Keychain?

  • matan
    matan
    Community Member
    Options

    No. I mean doing the automation by copying from Safari all the passwords, instead of Keychain Access.
    His script does the opposite, but it shows that it’s double.

  • MrC
    MrC
    Volunteer Moderator
    Options

    @matan,

    I suppose I might be able to write something like this and include it in the converter. I just moved the converter suite away from using AppleScript to drive the export from the security command (because it was a nightmare), and I'm hesitant to embark down this road for the same reasons. AppleScript (and automation) is being slowly phased out by Apple, and I've grown a little weary from the constant support required with each new macOS update. Only recently, Apple made it essentially impossible to copy iCloud keychain items to a local keychain.

  • matan
    matan
    Community Member
    Options

    @MrC,
    Because of not being able to copy from iCloud keychain to local keychain I've suggested this solution, and sadly I can't see other ways to achieve this.

  • Artem4ik
    Artem4ik
    Community Member
    Options


    What's my mistake?

  • MrC
    MrC
    Volunteer Moderator
    Options

    @Artem4ik ,

    You need to export the Keepass 2 database as XML. The keepass2 converter cannot work on the encrypted database file. This is mentioned in the Keepass section of the README.pdf.

    Also, be sure you are using the 1.10 version in Stable Bits, mentioned in the first post of the converter suite thread.

  • Artem4ik
    Artem4ik
    Community Member
    Options

    @MrC ,
    .XML:

  • MrC
    MrC
    Volunteer Moderator
    Options

    @Artem4ik ,

    The error is telling me you are still using version 1.09 of the converter suite. Use 1.10.

    1. Which version of Keepass 2 did you export from?
    2. From which platform did you export?
    3. Which version of macOS is this?
    4. Did you select the export option as shown below ?

  • NCR
    NCR
    Community Member
    Options

    Hello MrC!
    First of all - THANK YOU for you awesome work on the converter.
    I am using StickyPassword 8.1.1 on OS X and exporting the database (.spdb file) requires to set a password for the export file which seems to be encrypted. Do you know of any way to prevent the encryption or is there a way to decrypt the file first within the converter?
    Best regards!

  • MrC
    MrC
    Volunteer Moderator
    edited July 2018
    Options

    @NCR,

    As far as I can tell, StickyPassword for macOS does not support exporting to a plain text format - this is a Windows-only StickyPassword feature.

    Do you have a Windows system on which to transfer the database, import, and export as text?

  • scottypa
    scottypa
    Community Member
    Options

    Hello, I'm a new user to 1Password. Here's my info:

    1Password version: 7.1.567
    Source password manager: KeePass 2.38
    Windows 10 ver 1703 build 15063
    

    Getting hung up while trying to run the command: perl convert_to_1p4.pl --help.
    This returns:
    Can't locate Date/Calc.pm in @INC (you may need to install the Date::Calc module) (@INC contains: C:/Users/scott/Desktop/convert_to_1p4/. C:/Users/scott/Desktop/convert_to_1p4/Modules C:/myperl/perl/site/lib C:/myperl/perl/vendor/lib C:/myperl/perl/lib .) at C:/Users/scott/Desktop/convert_to_1p4/./Utils/PIF.pm line 18.

    I saw a note earlier about using a version of StrawberryPerl prior to 5.26 so I used 5.24.4.1. Thanks for the assistance.

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @scottypa ,

    Quick reply...

    Did you run the install_modules.bat script first?

    Which bit-version of Strawberry Perl did you get 32 or 64?

  • scottypa
    scottypa
    Community Member
    Options

    Yes, I did run install_modules.bat first. I grabbed the 64-bit version.

This discussion has been closed.