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

Options
1111214161752

Comments

  • MrC
    MrC
    Volunteer Moderator
    Options

    @jrsforums,

    You can pick up the changed modules, but don't bother (since you have to know what they are ahead of time). Just grab the entire zip file and replace everything.

  • chris_l45
    chris_l45
    Community Member
    Options

    Hi, I was attempting to export from iCloud Keychain and got the following error:

    `Chriss-MacBook-Pro:~ chris$ cd '/Users/chris/Desktop/convert_to_1p4/' && /usr/bin/perl5.16 convert_to_1p4.pl keychain '/Users/chris/Desktop/pm_export-icloud.txt' -v
    Odd number of elements in hash assignment at Converters/Keychain.pm line 146 (#1)
    (W misc) You specified an odd number of elements to initialize a hash,
    which is odd, because hashes come in key/value pairs.

    Use of uninitialized value in list assignment at Converters/Keychain.pm line
    146 (#2)
    (W uninitialized) An undefined value was used as if it were already
    defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
    To suppress this warning assign a defined value to your variables.

    To help you figure out what was undefined, perl will try to tell you
    the name of the variable (if any) that was undefined.  In some cases
    it cannot do this, so it also tells you what operation you used the
    undefined value in.  Note, however, that perl optimizes your program
    anid the operation displayed in the warning may not necessarily appear
    literally in your program.  For example, "that $foo" is usually
    optimized into "that " . $foo, and the warning will refer to the
    concatenation (.) operator, even though there is no . in
    your program.
    

    Examined 261 items
    Skipped 261 non-login items
    Skipped 0 duplicate items
    Imported 0 items
    Exported 0 total items`

    Could you help me out please?
    I'm on El Capitan 10.11.4
    Is there any other info you need to help me?

    Thanks in advance.

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @chris_l45 ,

    Please try the 1.09 version of the converter, in Testing Bits mentioned in the converter suite post. It resolves an issue where some keychain exports have an additional line of text in them:

    Version 1.09:
    - Handle a possible "version" line in an iCloud keychain export for keychain converter.

  • chris_l45
    chris_l45
    Community Member
    Options

    Hi @MrC
    Thanks for the quick reply! It worked, but when I imported it into 1P all of the logins were called AirPort. Just FYI for future updates. I can change them manually, unless you have a solution right now?

  • MrC
    MrC
    Volunteer Moderator
    Options

    @chris_l45 ,

    Hmmmm, that's curious. Let me take a look...

  • MrC
    MrC
    Volunteer Moderator
    edited January 2016
    Options

    @chris_l45 ,

    Can you re-run the conversion command but add the following to the end of the command line:

    -d | egrep 'attr\(svce|attr\(srvr'
    

    This will dump the various titles. Can you verify that you have titles other than AirPort?

  • chris_l45
    chris_l45
    Community Member
    Options

    @MrC
    I'll try that. thanks.
    actually there were just 2 that weren't airport - com.apple.twitter.auth-token-secret and com.apple.twitter.auth-token

  • chris_l45
    chris_l45
    Community Member
    Options

    @MrC
    So I tried that with the addition, but when I imported it, they were all still called AirPort, except for the com.apple.twitter ones and also Jabber, CardDAV, and iTools. (I wasn't ever sure what I tools was so I looked it up in keychain - it's my MobileMe/icloud account.)
    so the command I ran was
    cd '/Users/chris/Desktop/convert_to_1p4/' && /usr/bin/perl5.16 convert_to_1p4.pl keychain '/Users/chris/Desktop/pm_export-icloud.txt' -v -d | egrep 'attr\(svce|attr\(srvr'
    and the result was a bunch of for all my pw's. (and the site was correct for that part)
    do_import : attr(srvr) => '"accounts.google.com"'

    I'm heading to sleep fyi so if you're still up I won't reply till morning.

  • MrC
    MrC
    Volunteer Moderator
    edited February 2016
    Options

    @chris_l45 ,

    The additional commands I gave above were only to help verify some entries - the conversion wouldn't have changed.

    I've uploaded a new version of 1.09. Please give it a try. I see what might have gone wrong theoretically, and have applied a fix. Let's see if it resolves your issue.

  • chris_l45
    chris_l45
    Community Member
    Options

    @MrC
    Awesome! It worked. Thank you so much for all your help. You're amazing!
    Thanks for giving up time on your weekend to help me.

  • MrC
    MrC
    Volunteer Moderator
    Options

    @chris_l45 ,

    Fantastic!

    These are the types of errors or bugs that always make me get a little nervous. Since I don't have access to the actual data, I have to imagine what could be going wrong, based on scant data or hinting information. That part I'm OK with. The worry comes that I'll end up causing folks like you to perform lots of debugging for me (acting as my eyes).

    Enjoy 1Password!

  • chris_l45
    chris_l45
    Community Member
    Options

    @MrC
    No problem! It's so cool that you can do that, anyway I can help I'm happy too.

    Thanks! Already am.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    I'm glad that you were able to get your data covered with MrC's help. He's amazing! :chuffed:

  • cpeek
    cpeek
    Community Member
    Options

    I am not sure if I am supposed to start a new thread or just tag onto this one. I am converting a Keepass 2 data file for import into 1Password. I have done the conversion, and can get the conversion to run just fine.

    My question is about converting the password history. The history of old passwords with dates changed for each login are exported in the Keepass 2 xml file format, but the conversion process is not importing the history. Is it possible to convert and import the password history?

  • MrC
    MrC
    Volunteer Moderator
    edited February 2016
    Options

    Hi @cpeek,

    This is a perfect place for your post.

    Currently the keepass2 converter is not retaining the History items. I'll have to update the converter to retain the password history. Its going to take me a few days, since I'm swamped right now.

    Do you want any of the other history stored in the Notes section? If so, which fields?

  • cpeek
    cpeek
    Community Member
    Options

    Awesome - thanks for a quick response and the willingness to do it. May basic need is that I need it to capture the date/time and password of previous passwords.

    I think that capturing the historical Notes section would be a useful addition as well for the tool. Although, I am not sure where best to map the historical notes to in 1Password (maybe a date/time list of the notes in the 1Password notes field, or maybe a text attachment in 1Password).

  • heme
    heme
    Community Member
    Options

    HI , first of all i would like to thank you for your great work :))

    i'm faced it when i tried to convert from keychain to 1password ..

    what can i do :(

  • heme
    heme
    Community Member
    Options

    i faced *

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @heme,

    I was still asleep when you posted your question - sorry for the delay.

    Is that Keychain an exported keychain? I ask, because it is located in a curious directory, and I wouldn't expect you would have placed it there (since that isn't the README-recommended location, nor a place users would normally store files).

    Also, which version of the converters are you using?

  • heme
    heme
    Community Member
    edited February 2016
    Options

    oh , sorry for S/L/K directory , actually it happens also when the file is placed on the desktop
    i tried to use the latest beta " Testing Bits " and the stable one too , same error

    as i can tell , from my little experience with programming , utf8 is something related to languages , and i'm an arabic speaker , would it help you ?
    i don't think that there are an arabic strings in My keychain .

    @MrC

  • MrC
    MrC
    Volunteer Moderator
    Options

    @Heme,

    UTF-8 is an encoding for Unicode characters. Don't focus much on the errors you see there - these types of errors can occur when you feed a converter the wrong type of file, of feed it something it isn't expecting. Since the converter can't know what it actually is receiving, it goes about doing a few quick sanity checks, and then tries to convert the data.

    It doesn't matter where you place the exported file. It only matters how you exported it, and what you did with the data afterwards. Can you describe what you did to export the data?

  • heme
    heme
    Community Member
    edited February 2016
    Options

    @MrC
    thanks for your quick response
    i've done what shown in Readme file ,

    i have the two files on my desktop , then i opened AppleScript_Conversion_Helper
    and selected keychain , and selected the .keychain file , is it wrong ?

  • MrC
    MrC
    Volunteer Moderator
    Options

    @heme,

    Sorry for the delay. We've just moved back into our remodeled home, and my office is not put back together yet. My top priority this weekend is to get that completed, and then I can review the source code and see what's wrong.

    My guess is that your export contains an unexpected data entry, and this is tripping up the parser. Once I'm back online, I'll give you directions to help me debug the problem, without revealing any confidential information.

  • mclarenm
    mclarenm
    Community Member
    Options

    Great forum Mr. C. Thanks for it. I was wondering if you have in development something to transfer my vault from LockBox Pro (iOS) to 1Password (iOS). I can export my Lockbox Pro to my Mac, but its in a special, non-1Password-importable format, I think (e.g., LockBoxPro.webarchive). Can you help with this?

  • MrC
    MrC
    Volunteer Moderator
    Options

    Hi @mclarenm ,

    Thanks for the nice compliment.

    Is the export from LockBox Pro encrypted, or is the webarchive plain text? If it is encrypted, there not much I can do (unless I know their encryption scheme). If not encrypted, it might be possible to convert, but I'm swamped right now, so would not be able to evaluate the possibility for about a week.

  • mclarenm
    mclarenm
    Community Member
    Options

    Thanks for the quick response Mr. C. The export from LockBox Pro is a ".webarchive" file that opens by default in a browser and displays the info contained therein, but it is really an ASCII editable file that is not encrypted. Each entry has 4 sections, as follows...

    Title - a one line title for the entry, that shows up in the top level list
    Information - a set of 0 to n single lines with text as defined by the user
    Category - the entry category, from the set of possible categories {Credit Card, Bank Account, Password, Contact Info, Notes, Other}
    Notes/Additional Info - a set of 0 to n single lines with text as defined by the user

    Below are the contents of an example file...

    .pkt_added {text-decoration:none !important;}

    Title: American Express
    Information: 1234 123456 12345, 02/15, 1234
    Costco User1: 123456789012
    Costco User2: 123456789012
    Category: Other
    Notes: 
    
    Title: AT&T
    Information: AT&T Access ID: lastname.firstname@gmail.com
    Account No: 123456789012
    pw: password
    Category: Other
    Notes: 
    
    Title: Wells Fargo Bank
    Information: 1234567890
    username
    pasword
    Category: Other
    Notes: 
    

  • MrC
    MrC
    Volunteer Moderator
    Options

    @mclarenm ,

    I see. The file export format is a bit ambiguous, in that the Information or Notes could also contain the exact markers used to define an item. For example, what happens when Notes: contains the data:

    Notes:
    my nice notes
    Title: Some Title within notes
    And now a bunch of other stuff,
    perhaps even some lines that start with Information:
    Information: my Information within Notes.
    Yuck
    

    Ill-defined plain text exports are troubling.

  • mclarenm
    mclarenm
    Community Member
    Options

    You are right. But, I guess I haven't come across that with my entries. I'm guessing whatever Lockbox Pro exports is not ambiguous to Lockbox Pro, but I don't use colons or the key words in my fields.

  • MrC
    MrC
    Volunteer Moderator
    Options

    @mclarenm ,

    I could write a converter with the caveats mentioned above. The eWallet export suffers from the same weaknesses, but for most cases it works fine. Users sometimes would have to manually adjust some records to eliminate the hazard.

    I doubt Lockbox Pro reads that export format as a means to transfer the data. It would fail in the same way, since the data is self has insufficiently defined record and field boundaries. Any person or program reading the data will have to make some assumptions and guess as to the location of those boundaries under the described circumstances.

    I won't be able to get to this for a little bit, as I'm already swamped.

  • mclarenm
    mclarenm
    Community Member
    Options

    I could write the converter myself if I had the spec for the 1Password importable format. I guess it reads comma delimited Tex files at least, but is there a spec for the other input formats?

This discussion has been closed.