Can you add a feature to print the password with some security

2»

Comments

  • jchiar
    jchiar
    Community Member

    Got past it by installing the modules. Looking at the data...

  • MrC
    MrC
    Volunteer Moderator
    edited March 2017

    @jchiar

    Which version of OS X is this? That module should be included already in the base Perl.

    For some reason, you are using Perl 5.24, but that doesn't ship even with Sierra. Where did you get this Perl?

  • jchiar
    jchiar
    Community Member
    edited March 2017

    @MrC
    I ran it with the following:

    JoeChiarelliMBPRO:convert_to_1p4 jchiar$ perl convert_to_1p4.pl onepif -v --format html_pwencode --encodekey 345 /Users/jchiar/Desktop/pass.1pif/data.1pif
    Imported 2 items
    Exported 2 login items
    Exported 2 total items
    Your output file is /Users/jchiar/Desktop/1P_converted.html

    But the output file password does not appear encoded.

  • MrC
    MrC
    Volunteer Moderator
    edited March 2017

    @jchiar - Checking now...

    Arg, somehow this formatter is the same as the html_compact formatter. Let me see what happened.

  • jchiar
    jchiar
    Community Member

    @MrC I think Perl 5.24 got install with Macports. I am using Sierra.

  • MrC
    MrC
    Volunteer Moderator
    edited March 2017

    @jchiar ,

    Sorry for the mixup and delay - it's been nearly a month since we worked on this, and I had to get my mental context back.

    Somehow, I'd overwritten the html_pwencode formatter - I've just updated the code in Testing Bits. Please see if that works for you.

    Re: MacPorts - yes, you're on your own wrt having to install modules if you use MacPorts. I'm happy to help users with this, but since its very rare, I don't write instructions for this setup.

  • jchiar
    jchiar
    Community Member

    @mrc That worked great! I validated my password and i was able to decrypt it. If you add support for other fields, let me know if you need some testing!

  • MrC
    MrC
    Volunteer Moderator

    @jchiar - awesome. Which fields do you need / require?

  • jchiar
    jchiar
    Community Member

    @mrc could you do secure notes? the Notes field. That would be golden.

    I noticed a small error, maybe the math.

    If you do the following , you get the same output

    JoeChiarelliMBPRO:convert_to_1p4 jchiar$ perl convert_to_1p4.pl onepif -v --format html_pwencode --encodekey 22 /Users/jchiar/Desktop/1Password.1pif/data.1pif
    Imported 1 item
    Exported 1 login item
    Exported 1 total item
    Your output file is /Users/jchiar/Desktop/1P_converted.html
    JoeChiarelliMBPRO:convert_to_1p4 jchiar$ perl convert_to_1p4.pl onepif -v --format html_pwencode --encodekey 02 /Users/jchiar/Desktop/1Password.1pif/data.1pif
    Imported 1 item
    Exported 1 login item
    Exported 1 total item
    Your output file is /Users/jchiar/Desktop/1P_converted.html

    Maybe due to 0 being the first key?

  • MrC
    MrC
    Volunteer Moderator
    edited March 2017

    @jchiar ,

    You mean the Notes section in a Secure Note (but not Notes sections in other items)?

    This will get messy, since Notes can contain non-printable characters (newlines, etc), and Notes are Unicode (UTF-8), and not ASCII.

    The 02 vs 22 bug is now fixed in the update just posted. I was reading the key as an integer, and hence the leading 0 was tossed. I'm now reading it as a string:

    $ diff 02.1pif 22.1pif
    32c32
    < <span class="fieldname">password: </span>6d77705f7371776d7262</li>
    ---
    

    password: 6b776e5f7171756d7062

  • jchiar
    jchiar
    Community Member

    @mrc wow your fast!
    It would be great to get Notes from all items because I sometimes store things like password hints in Login items. But definitely secure notes - notes.

  • MrC
    MrC
    Volunteer Moderator
    edited March 2017

    @jchiar

    Please re-read my entire post above, since I edited it as you were typing (esp. the part about the much wider character set than ASCII). Your simple encoding scheme won't work.

    Why aren't you placing Password Hints in "password" type custom fields?

  • jchiar
    jchiar
    Community Member
    edited March 2017

    @MrC I do use password hint in the label field. Is that the custom fields?

    So no way to encode the secure notes- notes section since they are in UTF-8?
    Perhaps notes could be convert UTF-8 Unicode string to ASCII Unicode escaped String first?

  • jchiar
    jchiar
    Community Member

    @mrc Do you have a tip jar BTW?

  • MrC
    MrC
    Volunteer Moderator

    @jchiar ,

    What I mean by "password type" was using a custom field and setting its TYPE to password (there are other types: phone number, URL, email, address, etc.). This means, by default, that the value will be concealed, and it has to be revealed to be seen. But for the converter, it also means I can see the TYPE and do the encoding for you. Hence, you would not place it in Notes, and would then not need your notes obfuscated.

    Any text can be encoded, but your simple encoding scheme does not account for UTF-8. Some visible characters (i.e. a "glyph") can be actually represented by 1 or 2 bytes, and some can be derived in more than one way (i.e. combining characters).

    I have no idea what "ASCII Unicode escaped String" means - ASCII and Unicode are two different things. ASCII is a simple 7-bit character encoding scheme. And Unicode is a standard which defines support for multiple encoding schemes (UTF-8, UTF-16LE, etc.). So your term "Unicode ASCII" makes no sense. Example - the character é is represented in UTF-8 as the two (hex) bytes c3 a9 - that's two characters that have to be encoded. How should these be shifted? The c3 by one shift value, and the a9 by another? Or should both be shifted by the same amount so é is just one glyph (one visible character)? Also, we're jumping over the non-printing characters in the ASCII table set - the UTF-8 table is MUCH larger, so our simple adjustment won't work.

    And seriously, do you really want to manually decode a paragraph worth of text from the Notes section of an item?

    No tips - do something nice for someone - pay it forward.

  • jchiar
    jchiar
    Community Member

    @MrC Yeah I guess doing notes is difficult and probably too hard to decode. Are bank account items ASCII or UTF-8?

  • MrC
    MrC
    Volunteer Moderator
    edited March 2017

    @jchiar ,

    Any "text" item in 1Password is UTF-8. Passwords are not* - they are special - because a single character could be represented using different byte sequences, and user's should never be unable to enter a password on different platforms due to this.

    * More accurately, only certain characters are allowed to be used in passwords, even though in the export format ALL the items are in UTF-8 - its just that standard printable ASCII characters map to the same positions in UTF-8.

This discussion has been closed.