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

1356752

Comments

  • mishaw
    mishaw
    Community Member

    Unfortunatelly, my case is a little bit different, as neither URL nor Location fields are being filled during the conversion/import. I tried opening each entry and it didn't help.
    Also, the 1.01 did not help here.
    What may help is a set of error messages during the conversion process:

    Any ideas?

  • MrC
    MrC
    Volunteer Moderator

    Hii @mishaw,

    Thanks for the error messages. I'll take a look to see what would cause this, though I have some ideas.

    Can you tell me if you've customized any of your fields in LastPass?

  • mishaw
    mishaw
    Community Member

    Hello again @MrC, thank for your time and engagement!

    no, the only thing I did was to remove the "secure notes" section from the LastPass export so not to confuse the tool. The only things left are comma-separated website usernames and passwords with structure as described previously:

    url,username,password,extra,name,grouping,fav

    It also looks that fields like grouping and fav are not being converted as well (apart from url. Only name, username and password seems to be moved.

  • MrC
    MrC
    Volunteer Moderator

    The converter tool is expecting to have an unmodified LastPass export. It handles the format output by LastPass, so you don't want to modify it.

    I read last night in the Windows forum that an import problem was fixed with 1Password for Windows. It had to do with matching the Location and/URL fields in the import wizard.

  • airplay
    airplay
    Community Member

    Hi, I just wanted to come here to inform you that my conversion from KeepassX worked like a charm with your utility. I just wished agilebits had made the utility more visible on the suppost pages, that would have saved me many hours of searching and tweaking withthe csv export/import. Thanks a lot!

  • mishaw
    mishaw
    Community Member

    @MrC‌ true - just checked and native 1Password csv import worked like a charm!

    • Thank you!
  • MrC
    MrC
    Volunteer Moderator

    Great to hear you've both successfully imported! Enjoy 1Password.

  • Scott Denning
    Scott Denning
    Community Member

    @MrC: Thank you very much for providing this extremely useful utility! Following your directions here in the forum I have successfully dumped my OS X Login Keychain passwords, converted them to a .1pif file, and imported them into 1Password5.

    Unfortunately, the contents are only a small fraction of what's stored in iCloud Keychain on OS X and iOS, and hundreds of my passwords have not made the journey from iCloud Keychain to 1Password5.

    I'm using 1Password 5.02, OS X 10.10.1, Keychain Access 9.0, and convert_to_1p4.pl dated Oct 13, 2014.

    Keychain Access on OS X shows 4 separate keychains, named "login," "iCloud," "System," and "System Roots." Most of my passwords reside in the "iCloud" keychain, but the "security dump-keychain" command only dumps the contents of the "login" keychain, which is maybe 10% of the overall contents of iCloud Keychain.

    This seems to be an OS X issue, not a 1Password or convert_to_1p4.pl issue, since everything in the keychain.txt file does in fact get imported. I've read the documentation on security dump-keychain and don a fair amount of googling, but can't for the life of me figure out how to dump the contents of the much larger "iCloud" keychain rather than the small "login.keychain" to be converted by your perl scripts.

    Any help or advice would be very much appreciated!

    Thank you.
    Scott Denning

  • Multax
    Multax
    Community Member

    Thanks MrC. Your converter works great and I have succesfully converted my mSecure-files to 1Password. Good ReadMe pdf-file and clear instructions. Appreciate your work!!

  • MrC
    MrC
    Volunteer Moderator

    @Scott Denning‌ - I'll do a little research on this, but can't get to it until Tuesday. Sorry for the delay.

    @Multax‌ - thanks for nice words and feedback...Success!

  • jcadona
    jcadona
    Community Member

    MrC congratulations on your job and sense of cooperation. I use SplashID and I'm still understand all this stuff to do the import correctly. I think that would be the obligation AbileBits create an effective import tool to make life easier for everyone and gain market share.

  • MrC
    MrC
    Volunteer Moderator

    Hi @jcadona‌,

    My pleasure. Perhaps I might be able to help you get your data imported.

    I know the AgileBits folks would like to have a full suite of importers. I'd suspect the issue is simply one of balancing resources, keeping the price of 1Password as low as possible, and providing as rich a feature set as possible for routinely-used features.

  • bullfish
    bullfish
    Community Member

    Well I had high hopes for this as I'm looking to export mSecure to 1password. The readme is outdated. I'm using Windows and the instructions call for ActivePerl 5.16. Well you cant get that unless you pay $$$$. So I tried 5.18 and the latest 5.20. Neither of these work as directed in the readme file. I'm not able to type in perl or ppm as stated in the instruction the path is set but commands are not working. Where can I download ActivePerl 5.16 or is this update to work with ActivePerl 5.20?

  • MrC
    MrC
    Volunteer Moderator

    Hi @bullfish‌,

    Sorry for the troubles. The README is fine, but it appears ActiveState has very recently changed their download and updated the version of Perl for the community edition. Darn.

    I'll have to update and test the code to work with the newer ActivePerl. Please contact me at my email address in the top of the script for a workaround until I can get to it.

  • bullfish
    bullfish
    Community Member

    Hi MrC, I ended up copying all your files into the C:\Perl64 (which is where ActivePerl 5.18 and ActivePerl 5.20 install) and ran perl from there. ppm said no packages found but i still continued to run the export. I was able to get it to work, but its a mess with mSecure. I would need to manually edit about 90% of the entries... :neutral_face:

  • MrC
    MrC
    Volunteer Moderator
    edited December 2014

    The relocation of the conversion script and its accompanying files wouldn't resolve the situation.

    There were several reasons for requiring Perl 5.16.

    One of those reasons is the availability of ActivePerl modules (modules are specifically built and made available via PPM for an ActivePerl version and OS platform). Many modules were not available for the newer 5.18 and the newest 5.20 version of Perl so I stayed with the long-deployed and widely available 5.16 version. And in Perl 5.18 and above, ActiveState has made some 32-bit modules only available in their business edition ($$$$). Ugh.

    Another reason is that Perl version 5.16 is available on OS X, and bumping the version would prevent usage on older OS X installs (some users still only have version 5.12).

    And yet another reason for using 5.16 is that 5.18 and version 5.20 changed some basic Perl syntax and constructs.

    So I went with the common denominator - Perl 5.16.

    Now, that's no longer an option, and I have to check if the required modules are available for 5.18 and/or 5.20, ensure that the code is compatible with 5.16 and upwards, and update the README to reflect the recent removal of ActivePerl 5.16 from the ActiveState website.

    I don't know which version of each of the required modules are included in the Perl versions you've tried, so am not really surprised with a non-functional result. The mSecure module requires the Text::CSV module and a Utils module requires Date::Calc, and I've validated correct operation against certain minimum versions of these modules.

    But I'm also not clear on what you mean by "mess", or if there were important error messages output that might give a clue as to which areas of the code to immediately focus my attention.

    So you're currently in uncharted waters... hence my suggestion that you contact me offline so I can discuss additional options.

  • MrC
    MrC
    Volunteer Moderator
    edited December 2014

    Update: I've quickly tested that Strawberry Perl 5.16.3 will work. I was able to download the portable version, install the two required modules (for the mSecure converter) from CPAN, run the conversion and import the results.

  • bullfish
    bullfish
    Community Member

    @MrC no rush, take your time. I only received a few errors due to custom tables, but the import with 1password entries were not correct with fields, passwords, logins, etc.. Why not just include the Perl 5.16 with your downloaded script?

  • MrC
    MrC
    Volunteer Moderator
    edited December 2014

    Edit: the instructions below (and another that follows) are now included of the README file.

    Here are some quick instructions for using Strawberry Perl 5.16.3 on Windows. This will allow Windows users to run the converters since ActiveState has removed the required Perl version.

    1) Download the portable version of Strawberry Perl for your OS version:

    32-bit: http://strawberryperl.com/download/5.16.3.1/strawberry-perl-5.16.3.1-32bit-portable.zip
    
    64-bit: http://strawberryperl.com/download/5.16.3.1/strawberry-perl-5.16.3.1-64bit-portable.zip
    

    2) Unzip the archive and place the unzipped archive as the folder: C:\myperl (right click the archive, Extract All, and enter C:\myperl as the Destination path). When the unzip has completed, you can delete the zip file.

    3) Enter the following command into Window's Search programs and files box C:\myperl\portableshell.bat and hit Enter. This will open a command window with the required PATH variables set.

    The following commands will be entered into the just-opened command line window:

    4) Enter the command cpan Text::CSV and hit Enter. Be sure the command completes successfully (the last output from the command will end with -- OK).

    5) Enter the command cpan Date::Calc and hit Enter. Be sure the command completes successfully (the last output from the command will end with -- OK).

    6) Enter the command cd %USERPROFILE%\Desktop\onepassword-utilities\convert_to_1p4 and hit Enter.

    You can now follow the directions from Step 3 in the README.pdf file. When your conversion is complete, you can delete the C:\myperl folder.

  • Scott Denning
    Scott Denning
    Community Member

    MrC, do you have any information about how to extract the contents of the much larger "iCloud keychain" rather than the small "login,keychain" on OS X? Everything in your instructions worked like a charm for me, but I only get 24 passwords. I can see all the passwords in Keychain Access on the mac, but the "security dump-keychain -d login.keychain" command seems to be oblivious to the rest of the keychains. Maybe I should ask Apple tech support, but I suspect they'd prefer we just stuck with iCloud.

    Thanks for any help.

  • MrC
    MrC
    Volunteer Moderator

    Hi @Scott Denning‌,

    I had your issue near the top of my To Do list, but Today I got slammed with meetings, phone calls, house remodeling plans, and the unexpected issue that cropped up in the recent posts above. I should have time to explore this tomorrow. Sorry for the delay...

  • bwoodsom
    bwoodsom
    Community Member

    I am using the Strawberry Perl as instructed above and moved on to step #4 in the readme. I am trying to export from SafeWallet 3.0.7. I am sure I am doing something wrong in my entry. Please let me know what is wrong in my command line text. My Safewallet files are on the desktop named SafeWallet.xml.


    C:\Users\bwoodsom\Desktop\onepassword-utilities\convert_to_1p4>perl convert_to_1
    p4.pl safewallet -v ....\Safewallet.xml
    Error: failed to load converter module 'safewallet'
    Can't locate XML/XPath.pm in @INC (@INC contains: C:/myperl/perl/site/lib C:/myp
    erl/perl/vendor/lib C:/myperl/perl/lib .) at Converters/Safewallet.pm line 22.
    BEGIN failed--compilation aborted at Converters/Safewallet.pm line 22.
    Compilation failed in require at convert_to_1p4.pl line 38.

    Usage: convert_to_1p4.pl

    converters:
    clipperz ewallet handysafe keepass2 keepassx keychain lastpass msecure safei
    ncloud
    safewallet splashid

    specify one of the converters above on the command line to see complete options


    Do you see anything that I am going wrong. I have tried a few variations but I always get the same error.

    Thank You
    Bob

  • MrC
    MrC
    Volunteer Moderator

    Hi @bwoodsom,

    I just knew someone was going to use a converter that required an additional module before I had a chance to update the README ! :smile:

    Add a step 5.5:

    5.5) Enter the command cpan XML::XPath and hit Enter. Be sure the command completes successfully (the last output from the command will end with -- OK).

  • bwoodsom
    bwoodsom
    Community Member

    Thanks for the quick reply...

    I ran - cpan XML::XPath ran and ended in ok.I then ran - perl convert_to_1p4.pl safewallet -v ....\Safewallet.xml

    Output...
    Imported 0 Cards
    Exported 0 Cards

    Feels like I am getting close. No other errors this time.

    Bob

  • MrC
    MrC
    Volunteer Moderator

    Hi @bwoodsom,

    This part:

    ....\Safewallet.xml
    

    is not what you want. You'd want:

    ..\..\Safewallet.xml
    

    Notice the additional required backslash path separator.

  • bwoodsom
    bwoodsom
    Community Member

    perl convert_to_1p4.pl safewallet -v ....\Safewallet.xml

    Same outcome... Output... Imported 0 Cards Exported 0 Cards

    No errors.

  • MrC
    MrC
    Volunteer Moderator
    edited December 2014

    Ah, I missed that you were using version 3.07. You'll need my 1.01 update located in the _testing directory of my AgileBits Utilities folder. The key change:

    Version 1.01:

    >

    • New: Update SafeWallet converter to support the Windows 3.x XML version.

    Your command line above is still showing that you are entering four dots in a row. Perhaps that's just a typo in the post here.

  • agileuser789
    agileuser789
    Community Member

    Hi MrC,

    Great post on how to import into 1Password. My question is as follows. I successfully followed all your steps and ran the perl script. The results showed that 87 cards were imported however the next message said "Cannot create 1pif output file: \ /Desktop/1P4_import.1pif" "No such file or Directory"

    Not sure where I went wrong. I was exporting from KeePass v2.28.

  • MrC
    MrC
    Volunteer Moderator
    edited December 2014

    Hi @agileuser789,

    I assume you're running KeePass on Windows (most KeePass users are).

    I've made an update that is likely to resolve your issue (I changed how the Desktop folder path is calculated). You could try the 1.01 _testing version mentioned in the post just prior to yours.

    You can also use the -o option to specify the output file manually. Add to your command line the -o option followed by the path, for example:

    -o  D:\desired\path\to\1P4_import.1pif
    
  • agileuser789
    agileuser789
    Community Member

    Thanks MrC, that was the magic I needed. I'm all set! I also have to say thanks for the super fast turnaround on the forum post as well, that saved me a lot of time.

This discussion has been closed.