MrC's Convert to 1Password Utility (mrc-converter-suite)
Comments
-
MrC,
I guess the best way to describe what I'm looking for is I'm looking for something almost exactly like what 1Password displays on the screen.
Something simple enough for someone to easily find the title, username and password primarily. I don't care too much about the format, just trying to eliminate extra info. I tried the format you use for onepif2html2 and it looks great, I just don't know if my wife could read it and pick out the username in this example. I have mixed feelings about displaying the website URL. If if's short like this one it's nice to have, but some of the ones saved are hundreds if not thousands of characters.
As an example, this is the contents in the onepif2html2 output for that entry above:
title: Strava
password: MyPassword
tags: Cycling Social
notes:
ainfo: myemail@somewhere.com
autosubmit: Default
email: myemail@somewhere.com
ps: 0
scope: Regular
urls: https://www.strava.com/login
uuid: lyuvochangedsomestufflpgxzriq
created: 2000-01-01 01:00:00In this example, 1Password displays the username, but it's not called out in the html output. However, I looked at the CSV output 1Password puts out and it's a mess. If there was a single column that always had the title, username and password I could just delete the other columns and print that in Excel. But there doesn't appear to be a single column that holds the username, so that is likely why your scripts don't always print it in html. Somehow, 1Password always knows the username, but it's scattered through a bunch of columns in the CSV. Same with passwords, there are about a dozen columns with different spellings of password.
So given the format of the CSV file, what I'm asking may not be possible. If not, I'll be fine with what you have. I'm just not sure if my wife can wade through it all to find the fields she cares about. I'm trying to sell her on switching to 1Password but not being able to have a print out is making it a hard sell.
Thanks.
0 -
I may have sent you on a wild goose chase. The data you showed above confused me at first, until I remembered something. Version 6 of 1Password for Windows does not yet export to the 1PIF format. This is required for the onepif2html converter. Version 6 currently only exports to CSV or a flat text file (which you show above). 1Password 4 for Windows does export to 1PIF.
An updated onepif2html output would look something like:
I don't know when AgileBits plans on implementing 1PIF export capabilities to 1Password 6 for Windows.
0 -
@MrC: I almost typed "@ C S V"... I hope you'll take that as a compliment. :lol:
@DigitalMan: Anyway, that formatting looks really nice, and while I can't promise a time frame, we're working on adding 1PIF export to the new 1Password 6 Windows desktop app. It makes me sad that we don't have it yet. :(
0 -
Mr. C,
Yes, you are correct that 1Password6 can't export to 1PIF. I do hope that is added soon. However, I thought that I could export to CSV and then use your CSV converter script to convert CSV to 1PIF and then still use your onepif2html script to convert the 1PIF to html. I've had some success using this two step method.
Thanks.
0 -
@brenty, maybe I should change my moniker to @ "MrCSV" ?
@MrC: Well played, sir. :sunglasses: :+1:
@DigitalMan: That's what I was thinking, but I'll defer to MrC on that one.
0 -
Hello! Thanks a million for being so generous with your time and expertise.
I can't quite figure out what I'm doing wrong. I seem to have all the steps down, but when I do the final import into 1Password, only the items from the "Login" portion of my Keychain are transferring. Unfortunately, my Safari passwords all seem to be under the "Local Items" section, and are not transferring. Can you please point me in the right direction?
Thanks again, and many apologies if this has been answered before or is a dumb question.
Best wishes.
0 -
You're welcome!
If you are doing an OS X or iCloud Keychain import, please use the 1.09 version of the converter in Testing Bits, mentioned in the first thread of the converter suite. A bug was fixed a while ago, handling an unexpected line in the export output.
0 -
Hi there, I am indeed using 1.09. Also, to further specify, I am on Sierra.
0 -
Ah, OK, good.
There are two standard Keychains that you might want imported - the Local OS X keychain, listed as the logins Keychain, and the iCloud Keychain. The easiest is the local logins Keychain, and the README indicates how to export all the Local data. It generally contains logins, passwords, and sometimes notes.
I'm not sure what you are referring to by the "Local Items". I don't have any Keychain with this label. If this is something new that I'm unaware of, I'd like to figure out how you got that keychain name. Regardless, it may be as simple as using that keychain name when you do the export via the security command to dump the keychain.
Does that make sense?
0 -
@MrC ,
Thanks so much for the speedy reply. I am indeed trying to import the Local OS X keychain, not the iCloud one. However, when I open Keychain Access, under the Keychains header, there are four subheads: "login," "Local Items," "System," and "System Roots." The "login" section does contain passwords, but only ones related to Apple, iCloud, and the system itself. My Safari passwords are not in the "login" keychain, but rather the "Local Items" keychain.
So, when I run your utility, it is exporting only the handful of Apple-related passwords in the "login" section, and not my mass of Safari passwords in "Local Items."
Hope that helps a bit.
0 -
@MrC ,
Also: when I run the following script with "Local Items" instead of "login,"
security dump-keychain -d Local Items.keychain > ~/Desktop/pm_export.txt
Only a blank document is produced.
0 -
You can export other keychains by name. Use the security command, naming your "Local Items" keychain name instead of "local". The command might look like:
security dump-keychain -d "Local Items.keychain" > ~/Desktop/pm_export2.txt
The keychain name probably has to be exact, so be sure of your case. The double quotes on the command line protect the whitespace in the keychain name from the shell.
0 -
0
-
Happy to help, but need more than "Not working". The security command is exporting nothing using that named keychain? It exports something, but the converter is failing on that exported data? Not sure what the issue is.
0 -
@MrC ,
A file named "pm_export2.txt" is exported to the desktop, but it does not appear to contain any information. If I open the file in TextEdit, it is blank. If I convert the file using the AppleScript Conversion Helper, the readout says:
Examined 0 items
Skipped 0 non-login items
Skipped 0 duplicate items
Imported 0 items
Exported 0 total items0 -
Ok, got it. Since nothing was exported, it means the security command failed to export anything, either becuase the keychain name was not correct, or for some other reason I'm not aware of.
I don't have any Local Items keychain, and this article describes how it can get created:
https://macmule.com/2014/03/30/the-local-items-keychain-in-mavericks/
If you can't get the items exported (via the security command), the converter obviously can't do anything with the empty text file created (by the OS X shell).
I'd need to be able to get my system to create such a keychain in order to figure out the next steps. Hopefully that article will help. It might also be possible for you to copy that contents of that keychain, into a new one you create and can export.
0 -
@MrC ,
Understood. Thanks again for your help. At this point, I'm afraid I'm a bit out of my depth. But if you do find a workaround to this problem, please do let me know, as I'd love to use 1Password.
Best wishes-
0 -
Ok, I'll sure try.
FYI - to create a new keychain, and copy the items, it is pretty easy. You launch the Keychain Access program on your Mac. In the upper left you see your list of local keychains. To create a new Keychain, use File > New Keychain, and give it a very simple name without any spaces, etc. (such as temp). Now, you can go to your Local Items area, select all of the items there, Copy, and then go to your new temp keychain that you just made, and Paste them, and close out Keychain Access.
Now, you can use the security command to export those items inside the temp keychain (note I used the name "temp"):
security dump-keychain -d temp.keychain > ~/Desktop/pm_export2.txt
0 -
I haven't forgotten about you, and your explanation above ties the pieces together for me. I want to test the CSV output on a larger scale to be sure I understand all the fields that 1Password 6 is outputting for Logins. Since I can't control that output, I have no idea yet how much work it is for you to massage that data into a CSV that is consumable by the csv converter for your print out needs. You do get to control the headers (and therefore the field assignments).
I likely won't get to this for about a week, as I have family visiting.
0 -
Great work! I will convert my SPB Wallet Database to 1Password and i have 2 problems, first i have it in german and second you have not that categorie that i most used to save my data! Is there a chance that you add it to your converter! Most i used Computer: Password!
i give you the Dump:Computer: E-Mail Konto
Kennwort
Webseite
E-Mail
Computer: Passwort
IP:
g├╝ltig bis
Nutzername
Passwort
Webseite
System
Ergänzung
Computer: Software Seriennummer
Version
Kaufdatum
Eigent├╝mer
Key/Code
Lizenz bis
Hersteller
Produktseite
Registrierungs-Nr.
Programm
gekauft bei
Computer: Webseite
Nutzer
Kennwort
Webseite
E-Mail
Computers: Internetzugang - DSL
Benutzerkennung
Benutzer
Support Phn
Web Site
Passwort
Support Email
DSL-Kennwort
Computers: WiFi Access Point Card
Hersteller/Typ
IP Adresse
AP Name
Admin Pwd
Verschiedenes: Notiz/Datei
Datum/Zeit
Anmerkung 2
Thema
Anmerkung
Wireless LAN Card
SSID
KeyThanks!
Best regards
Peter0 -
Thanks! I'm happy to hear that the spbwallet converter was useful for you.
As you're aware, that password manager was obsoleted a few years ago, and so it only in use by a few people these days. As such, I have not added the more generic capabilities to localize the conversion process. I helped on user by explaining how do accomplish the job. The dump is primarily a debugging aid, and not enough to do the localization entirely.
To localize the conversion, the converter module Spbwallet.pm must be edited, and the table:
my %card_field_specs = ( bankacct => { textname => 'Bank Account', type_out => 'bankacct', fields => [ [ 'accountNo', 0, qr/^Account #$/, ], [ 'routingNo', 0, qr/^Routing #$/, ], [ 'telephonePin', 0, qr/^PIN$/, ], [ '_accountType', 0, qr/^Account Type$/, ], [ 'branchPhone', 0, qr/^Branch Phone$/, ], [ 'swift', 0, qr/^Swift Code$/, ], [ 'iban', 0, qr/^I\.B\.A\.N\.$/, ], [ 'url', 0, qr/^Web Site$/, { type_out => 'login' } ], [ 'username', 0, qr/^User Name$/, { type_out => 'login' } ], [ 'password', 0, qr/^Password$/, { type_out => 'login' } ], ...
has to be edited. The above shows the bankacct (Bank Account) category, the textual category name (textname => 'Bank Account'), and the fields within that category that are used to identify both the category type and the field names (e.g. the 'url' field is detected by the English phrase Web Site).
If you modify the English names on the right, changing the terms from, say Password to Kennwort, and change the textname to match the Category as shown in SPB Wallet (or the dump), then you can get better categorization.
That said, SPB Wallet also supports customized categories, and for those, you'd need to add table entries to the %card_field_specs table that correctly match the category name, field names, and instruct the converter on which target category the category itself maps to, as well as to which categories the individual fields map (a single entry can map to multiple 1Password entries of different categories).
Now, I'm not sure you're comfortable with, or want to spend the time, doing that customization for your one-shot conversion. If you do, or if you want to create a languages file for me, I'm happy to help you as much as you need. I just don't have the language expertise, or setup, to do the localization by myself.
Let me know how you'd like to proceed, or ask for more help if you need it.
0 -
Thanks a lot! Now i have modified your server category! And i understand, thats it possible to extend your converter with "own" categories. Was a great help - now all my 500 SPBWALLET objects are converted!
0 -
Hello MRC,
I am using Mac OS 10.11 to export icloud password from keychain Access. When I copy passwords from icloud to local-icloud. It gives me an error.I am using Stable bit
https://drive.google.com/file/d/0B0SMiIUgDm9AM0VoWS1EcndGUkU/view?usp=sharing
0 -
Hi @paulsahota ,
If you are doing an OS X or iCloud Keychain import, please use the 1.09 version of the converter in Testing Bits, mentioned in the first thread of the converter suite . A bug was fixed a while ago, handling an unexpected line in the export output.
Also, the Copy error you are seeing is likely due to a corrupt iCloud keychain. And this reply also may be off assistance in getting that resolved.
0 -
Please help. I'm getting the kicked back every time...
Nathans-iMac:~ nathanjoseph$ cd '/Users/nathanjoseph/Desktop/' && /usr/bin/perl5.16 convert_to_1p4.pl keychain '/Users/nathanjoseph/Desktop/pm_export.txt' -v
Can't locate Utils/PIF.pm in @INC (@INC contains: /Library/Perl/5.16/darwin-thread-multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.3 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16 /System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at convert_to_1p4.pl line 15.
BEGIN failed--compilation aborted at convert_to_1p4.pl line 15.
Nathans-iMac:Desktop nathanjoseph$0 -
Hi @nathan_joseph ,
I'm guessing you're on Sierra, and using the AppleScript_Conversion_Helper.
Please use the 1.09 version of the converter suite located in Testing Bits - it is mentioned in the first post of the converter suite thread. It resolves an issue encountered in Sierra, in that Sierra is more rigorous about sandboxing AppleScript applications. It also resolves some keychain converter issues.
Be sure to follow the directions in the README.pdf, esp. that the convert_to_1p4 folder must be on the Desktop.
0 -
I have everything loaded on my desktop and I move the csv file to Applet Conversion file, it goes thru the routine, asks which type of conversion(mSecure) but I get the following output:
'/private/var/folders/7t/k5sk0hy96j92g164sqccw6440000gn/T/AppTranslocation/FB9EC67D-C01D-4D2F-957A-D61A2614987C/d/' && /usr/bin/perl5.16 convert_to_1p4.pl msecure '/Users/Laptop2_13/Desktop/convert_to_1p4/pm_export.csv' -v
Can't open perl script "convert_to_1p4.pl": No such file or directory
Susans-MacBook-Pro13Inch-9:d Laptop2_13$Can you advise why it is saying the file is not found? The Perl file is in the directory and named exactly as required.
Thanks,
Susan
0