Giter Site home page Giter Site logo

roddhjav / pass-import Goto Github PK

View Code? Open in Web Editor NEW
800.0 17.0 88.0 1.94 MB

A pass extension for importing data from most existing password managers

Home Page: https://www.passwordstore.org/

License: GNU General Public License v3.0

Makefile 1.19% Shell 0.52% Python 88.84% Roff 4.21% HTML 5.24%
password pass pass-extension password-manager importer password-store import keepass-importer pimport

pass-import's Introduction

Hi there πŸ‘‹

Just a French living in Ireland. Security researcher at The Collaboratory. Ph.D from University College Dublin. My area of work includes user privacy, secret management and system security.

If you like my work and want me to be able to keep improving it, please sponsor me on GitHub.

Generally you can find me on many places as roddhjav: Mastodon | Twitter | Gitlab | Keybase

My projects

Pass

  • pass-audit: A pass extension for auditing your password repository. (python)
  • pass-import: A pass extension for importing data from most existing password managers. (python)
  • pass-tomb: A pass extension that helps you keep the whole tree of passwords encrypted inside a Tomb. (bash)
  • pass-update: A pass extension that provides an easy flow for updating passwords. (bash)

System Security

  • apparmor.d: Full set of AppArmor profiles (~ 1400 profiles). (go)

pass-import's People

Contributors

2qar avatar aleksen avatar arahayrabedian avatar arturgoms avatar b123400 avatar boltronics avatar cbosdo avatar davidandreoletti avatar delirious-lettuce avatar demize avatar dwoffinden avatar edoardob90 avatar egasato avatar elho avatar jamesbvaughan avatar quentin-bettoum avatar roddhjav avatar santigz avatar sgn avatar shashwat183 avatar shinenelson avatar stef avatar sthing avatar t-mw avatar tcarrio avatar thomas-mc-work avatar urashav avatar vivlim avatar wfleming avatar wnemencha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pass-import's Issues

import.py line 649 tracebacks

Observed with AUR and git clone. Appears with type keepassxc or keepasscsv:

[rocket@halfworld ~]$ pass import keepasscsv passwords_unecrypted.csv
Traceback (most recent call last):
  File "/usr/lib/password-store/import/import.py", line 649, in <module>
    main(sys.argv)
  File "/usr/lib/password-store/import/import.py", line 608, in main
    importer.parse(file)
  File "/usr/lib/password-store/import/import.py", line 279, in parse
    self._checkformat(reader.fieldnames)
  File "/usr/lib/password-store/import/import.py", line 274, in _checkformat
    raise FormatError()
import.FormatError
[rocket@halfworld ~]$ pass import keepassxc /keybase/public/morpheuskafka/encrypted/vault.kdbx
Traceback (most recent call last):
  File "/usr/lib/password-store/import/import.py", line 649, in <module>
    main(sys.argv)
  File "/usr/lib/password-store/import/import.py", line 608, in main
    importer.parse(file)
  File "/usr/lib/password-store/import/import.py", line 279, in parse
    self._checkformat(reader.fieldnames)
  File "/usr/lib/python3.6/csv.py", line 98, in fieldnames
    self._fieldnames = next(self.reader)
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 3: invalid start byte

Entry title was splitted in 2 parts; one for dir and one part for filename

I tried to import a keepass 2.38 XML file with 1200+ entries.

Representation in XML:
<Value>Apple ID (fΓΌr iTunes / iPhone)</Value>

Was imported as a directory with the name "Apple ID (fΓΌr iTunes " (incl. trailing space),
and as file name " iPhone)" (incl. leading space).

Sure "/" has a special meaning on unix/linux filesystems, it should be converted e.g. to "-" (or another allowed character). From semantic standpoint a single entry should be imported as a single filesytem entry (not as 1x dir + 1x file).

If you do not want to do conversion by default you should skip that entry with a warning and have at least a "--force-import" and "--convert" command line option.

I discovered alot of other issues related to naming and filesystem. I used keepass/keepassX on Ubuntu, MacOS, Windows7, Windows10, iPhone and Android and i used pass (with QtPass) for the same set of devices and OS. This means that i have to take care about interoperability. While pass is file base, it means that it is limited by filesystem restrictions (special chars) opposed to other password managers (database based). Sadly pass itself do not print warning for interoperability issues, and one can get used with that when creating new passwords. But when dealing with old passwords (that do not have to deal with limitations in the past) then the situation is worse - especially on 1200+ passwords.

That means the importer should at least warn on interoperability issues (and should provide a option to convert it on import). Current git version of pass-import could lead to problems when i import e.g. on Ubuntu and then try to "git pull" password store on a windows system.

Not allowed on windows:

< (less than)
> (greater than)
: (colon - sometimes works, but is actually NTFS Alternate Data Streams)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
ASCII 0-31
can not end with spaces / dots
some filenames are not allowed: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9

Not allowed on linux:

/ (forward slash)
ASCII 0 (null bypte)
(should not start with dot)

Fore sure you can not cover all possible filesystems and all filesystem limitations but above should cover most problematic once.

Problems importing from 1password

Hi,

I've run into some issues importing from 1 password:

  • The CSV headers are like Password and not password, so the checker fails. this seems very easy to fix
  • The tags are in a weird format {(\ntag\n)} and it ends up pretty weird in the imported entries

But the main problem I have is with custom data. I have some entries in 1password with custom fields and they are not exported in the CSV (since they are freeform). I think the importer should use 1pif files instead of the CSV because they contain all data available and it looks easy to parse.

enpass2pass ignores duplicates

It appears that enpass2pass.rb ignores duplicates while importing from an enpass-generated CSV. This can potentially result in data-loss if someone imports a database, and then deletes the old database under the impression that everything was imported.

It would be great to (ideally) have this fixed, or for a warning to be placed in the README to that effect. Unfortunately, I'm not a Rubyist, or else I'd have made a pull-request for you.

Feature Request : Import from Dashlane

Please support importing the data from Dashlane

I was able to do that, using Dashlane's Unsecure CSV format, but I had to "shift" some columns, and used keepass2csv2pass.py

Traceback error when import of keypass2.xml

Command:
pass import keepass keypass2.38_onUbuntu.xml

Error:

Traceback (most recent call last):
  File "/usr/lib/password-store/import/import.py", line 776, in <module>
    main(sys.argv)
  File "/usr/lib/password-store/import/import.py", line 732, in main
    importer.parse(file)
  File "/usr/lib/password-store/import/import.py", line 334, in parse
    self._import(root)
  File "/usr/lib/password-store/import/import.py", line 513, in _import
    self._import(group, path)
  File "/usr/lib/password-store/import/import.py", line 516, in _import
    entry['title'] = self._getpath(xmlentry)
  File "/usr/lib/password-store/import/import.py", line 551, in _getpath
    return os.path.join(path, title)
  File "/usr/lib/python3.6/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.6/genericpath.py", line 149, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'
pass version
============================================
= pass: the standard unix password manager =
=                                          =
=                  v1.7.1                  =
=                                          =
=             Jason A. Donenfeld           =
=               [email protected]            =
=                                          =
=      http://www.passwordstore.org/       =
============================================
python3 --version
Python 3.6.5
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

How to solve that? (How to debug?)

-s option is ignored by clean

I am trying to import my passwords from keepass with the clean option to replace spaces with a "-" character.
pass import -cs - keepass file.xml

Expected behavior: All spaces are replaced by "-"
Current behavior: Space are always replaced with "_", regardless of the "-s" option.

Enpass imported not working

After try to import my enpass CSV file all the logins have the password field empty. Import pass only imported the logins names but was unable to import any password.

All keepass importers are broken

I've tried all the importers for importing from my keepass database, and they're all giving me language or execution errors. I am using exports from the appropriate program for each importer.

keepass:

mark@Ares-Linux ~ % pass import keepass Database.xml   
Usage: /usr/lib/password-store/importers/keepass2pass.py -f XML_FILE
Optional:
 -r ROOT_PATH    Different root path to use than the one in xml file, use "" for none

mark@Ares-Linux ~ % pass import keepass -f Database.xml  
pass import: invalid option -- 'f'
pass import - A generic importer extension for pass

Vesion: 0.2

Usage:
    pass import <importer> [ARG]
        Import data to a password store.
        ARG depends of the importer script.
        <importer> can be: keepassx revelation roboform enpass pwsafe fpm chrome kwallet kedpm keepass password-exporter 1password lastpass keepass2csv gorilla

Options:
    -v, --version  Show version information.
    -h, --help     Print this help message and exit.

More information may be found in the pass-import(1) man page.

keepassx:

mark@Ares-Linux ~ % pass import keepassx database.csv
Traceback (most recent call last):
  File "/usr/lib/password-store/importers/keepassx2pass.py", line 83, in <module>
    main(sys.argv[1])
  File "/usr/lib/password-store/importers/keepassx2pass.py", line 79, in main
    for group in ElementTree.parse(xml_file).findall('group'):
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1182, in parse
    tree.parse(source, parser)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 656, in parse
    parser.feed(data)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1653, in feed
    self._raiseerror(v)
  File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 7

keepass2csv:

mark@Ares-Linux ~ % pass import keepass2csv Database.csv 
File to read: Database.csv
Traceback (most recent call last):
  File "/usr/lib/password-store/importers/keepass2csv2pass.py", line 62, in <module>
    main(sys.argv)
  File "/usr/lib/password-store/importers/keepass2csv2pass.py", line 59, in main
    readFile(inputFile)
  File "/usr/lib/password-store/importers/keepass2csv2pass.py", line 32, in readFile
    prepareForInsertion(row)
  File "/usr/lib/password-store/importers/keepass2csv2pass.py", line 42, in prepareForInsertion
    notes = row[5]
IndexError: list index out of range

Unable to use pass-import: `No module named 'defusedxml'`

Hello! pass-import looks lovely, but I'm having troubles using it on an Ubuntu 17.04 environment.

I have installed the latest pass (v1.7.1) and pass-import (from git clone as well as stable version), but continue getting this error:

Traceback (most recent call last):
  File "/usr/lib/password-store/import/import.py", line 24, in <module>
    from defusedxml import ElementTree
ImportError: No module named 'defusedxml'

I figured maybe it was an issue with a missing dep, but even after verifying I'm using Python 3 and have executed sudo apt-get install python-defusedxml, I get the same error.

The error indicates this line as the issue:

from defusedxml import ElementTree

Do I need to install ElementTree? Are there missing deps during installation I can help identify? I know pass-import went through a re-write recently, so I'm guessing there just hasn't been many installs since.

KeePassX 2 support

Hi, thank You for maintaining the reposiroty.
Do You think You will, in the future, add support for KeePassX 2?

install fails on mac os sierra

➜  sudo make install
Password:
install: pass-import.1 -> /usr/share/man/man1/pass-import.1
install: mkdir /usr/lib/password-store: Operation not permitted
make: *** [install] Error 71

LastPass: ampersands are escaped and break the password

I imported my passwords from LastPass and all passwords that contained the character & in the original are broken. foo&bar is imported as foo&amp;bar.

Folder names have the same issue (but here it doesn't really hurt).

I checked some other special characters as well, but apparently the ampersand is the only one that breaks.

I used pass-import 2.1 (from AUR).

Import is not recognized as a pass extension

Hi Alexandre,
After downloading and installing pass-import on my debian jessie machine, I got the following error when I wanted to import my KeePassX db.
pass import passwords_jordan.kdbx
Error: import is not in the password store.

Any ideas about the problem ? Cheers ;)

Filename generated on ubuntu and commited can not be created on windows (git clone)

Import of following snippet from a keypass2 xml file:

<Group>
...
<Entry>
<String>
<Key>Title</Key>
<Value>MySQL  	web400_db2 </Value>
</String>
</Entry>
...
</Group>

Hex representation of Value:

4D 79 53 51 4C 20 20 09 77 65 62 32 30 30 5F 64 62 32 20

results in following file:

ls -al
-rw------- 1 christian christian  521 Dez 21 16:07 'MySQL__'$'\t''web400_db2_.gpg'

this part of the filename results in file creation problems on windows:

'$'\t''

[Feature request] Support passff entries from firefox kdewallet integration imports for the kdewallet importer

Seems pretty dead after the major shift in FF: https://addons.mozilla.org/en-US/firefox/addon/kde5-wallet-password-integrati/?src=api ..

I am going to modify the kdewallet importer anyways, so I thought I might as well share the labour with others. The only thing that needs change is how the data is extracted, and how it's formatted into the pass entry.

If you want this feature, do you have suggestions for how to format multiple URL's for the same set of credentials?

1Password and Unicode characters

Hi,

I have been trying to import my 1Password data and this script kept choking on characters outside the ASCII range. This is a big problem, because 1Password uses the checkmark character (0xE2 0x9C 0x93) a lot. I had to pipe the output of GPG through sed first before pass-import would finish correctly.

Chrome Import Issue

Using 2.2 on Linux. FF import fine. Exports form Chrome/Chromium fail to import with errors:

Traceback (most recent call last):
File "/usr/lib/password-store/import/import.py", line 753, in
main(sys.argv)
File "/usr/lib/password-store/import/import.py", line 709, in main
importer.parse(file)
File "/usr/lib/password-store/import/import.py", line 282, in parse
self._checkformat(reader.fieldnames)
File "/usr/lib/password-store/import/import.py", line 277, in _checkformat
raise FormatError()
import.FormatError

Chrome Version 49.0.2623.75 (64-bit)
Chromium Version 66.0.3359.181 (64-bit)

Unable to directly export from browsers so used the hack using sqlite3
sqlite3 -header -csv -separator "," ~/.config/chromium/Default/Login\ Data "SELECT * FROM logins" > ~/ChromiumPasswords.csv

Any ideas how I can circumvent this?

Allow for local installation

Currently the makefile is only suited for system-wide installation which requires administrator access. Since imports are probably only done once it might be very nice to not clobber the system directories or even having to ask an administrator to install it.

pass itself allows installing extensions into the .password-store directory in an .extensions subdirectory. pass-import's use of Python complicates things a bit, but it could be implemented by providing a suitable makefile recipe to install the scripts (python3 setup.py install --root=~/.password-store/.extensions + ln -s ... import.bash somewhat worked for me ;) plus something like export PYTHONPATH=$PASSWORD_STORE_DIR/.extensions/usr/local/lib/python3.5/dist-packages/ in import.bash.

chrome2pass import issue

Hello! Exported chrome csv via this guide, chrome google 62.0.3202.94.
pass import chrome chrome.csv:

Traceback (most recent call last):
  File "/usr/lib/password-store/importers/chrome2pass.py", line 40, in <module>
    data = row['password'] + '\n'
KeyError: 'password'

So looks like password field changed to password_value, right?

Python ModuleNotFoundError: No module named 'defusedxml'

After installing pass-import on OS X High Sierra 10.13.3 (17.4.0 Darwin Kernel Version 17.4.0) and running
> pass import --help
I am getting:

Traceback (most recent call last):
  File "/usr/local/lib/password-store/import/import.py", line 26, in <module>
    from defusedxml import ElementTree
ModuleNotFoundError: No module named 'defusedxml'

This can be of course fixed by simply running

pip install defusedxml

But it would imho be preferable to not have these sorts of dependencies.

Import with --clean failed

Command line statement:
pass import --clean --extra keepass zusammengefasst3.xml

Error

Traceback (most recent call last):
  File "/usr/lib/password-store/import/import.py", line 778, in <module>
    main(sys.argv)
  File "/usr/lib/password-store/import/import.py", line 733, in main
    importer.satanize(arg.clean)
  File "/usr/lib/password-store/import/import.py", line 271, in satanize
    entry['title'] = self._clean_cmdline(entry['title'])
KeyError: 'title'

On Ubuntu with most up-to-date git version.

By the way: Dealing with data is sometimes like fighting with the devil (satan), but please still try to do "sanity checks" instead of "satanizing" data. ;-) (see python function "satanize")

another chrome import issue

I had 4 passwords for 192.168.1.1 in chrome,
after importing to pass all data preserved correct except for filenames:

 .  Passwords imported:                                                                             
       chrome/192.168.1.1                                                                             
       chrome/292.268.2.2                                                                             
       chrome/393.368.3.3                                                                             
       chrome/494.468.4.4

Feature Request : Import from NetworkManager

Please support importing the wifi keys from NetworkManager.

NM stores PSKs in plain text, so this is more of a useful backup mechanism for copying to new machines, rather than a password database importer.

You can get the SSID/PSKs wiith: sudo grep -r '^psk=' /etc/NetworkManager/system-connections/ | awk -F'Auto |:psk=' '{print $2, $3}' but I'm struggling to munge it to fit pass insert syntax wise.

not initialized ?

Hi

I've been using pass for a couple of month, and I'm now trying to import my passwords from firefox via passwordexporter.

(pass-import) ➜  pass-import git:(master) βœ— pass search github
Search Terms: remy
└── remy
    └── github
(pass-import) ➜  pass-import git:(master) βœ— pass import passwordexporter firefox_logins_20181217100717.csv
 [x] Error: password store not initialized
(pass-import) ➜  pass-import git:(master) βœ— export PASSWORD_STORE_DIR=~/.password-store 
(pass-import) ➜  pass-import git:(master) βœ— pass import passwordexporter firefox_logins_20181217100717.csv
 [x] Error: password store not initialized

I don't get it, as proved by a simple search, my store is functional. But import say it's not initialized, even enforcing the path ? πŸ€”

Error when import from firefox (passwordexporter)

pass import passwordexporter ff.csv
Traceback (most recent call last):
  File "/usr/lib/password-store/import/import.py", line 758, in <module>
    main(sys.argv)
  File "/usr/lib/password-store/import/import.py", line 714, in main
    importer.parse(file)
  File "/usr/lib/password-store/import/import.py", line 586, in parse
    self._checkline(file)
  File "/usr/lib/password-store/import/import.py", line 272, in _checkline
    raise FormatError()
import.FormatError

File format:

hostname,username,password
https://wordpress.com,login,******
https://www.ratatype.com,[email protected],*******

Chrome Import

Hi,
I've been trying to import my passwords from Chrome but so far I've been getting a FormatError.
Could you point me in the right direction to address this issue?

Thank you!
A

pass import --clean is missleading

Description of "-c" and " --clean" command line option is "Clean data before import.".

I thought this will clean-up my password store (~/.password-store/) and removes everything except:
~/.password-store/.git
~/.password-store/.gpg-id

I learned by issue #55 that this is not the meaning for that option.

I recommend to (long-term) remove "-c" and "--clean" (depricated it in next release) and to add new option:

--replace-path-separators 
# (default "/"-->"-" and "\"-->"-")
--replace-path-separators="_" 
# ( "_" or any other allowed character)
--replace-path-separators="" 
# (to delete it; replace it with nothing)

As i am working in teams and git repo is team-shared (using .gpg-id for access management), i recommend to add a .pass-import file to the root to share pass-import config settings with the team. Pass-import should pick it from .pass-import first and should allow overriding via command line options.
Config file should contain a setting if this option should be active and with charater so use.

Dir with trailing space: dir creation failed on windows (git clone)

Import of following snippet from a keypass2 xml file:

<Group>
...
<Name>Tinmachine / Nutrition</Name>
...
</Group>

resulted in 2 dirs on my ubuntu disk:
Tinmachine (incl. trailing space)
and
Nutrition (incl. leading space; not visable in github markup)

When cloning this repo on a windows machine this results in dir named Tinmachine (without trailing space) and a failure when trying to create a dir in it named Nutrition (with leading space; not visable in github markup), but it fails, as it can not navigate to a dir name Tinmachine (with trailing space).

Is this useful? I wrote an automated script to organize imported passwords (e.g. from Gmail)

I wrote a quick Node.js script to automate the conversion of password store naming conventions from pass (https://passwordstore.org) into a more organized format. This is especially useful when importing πŸŽ‰

I imported passwords from a Chrome export, and all of them were organized like accounts.google.com0, accounts.google.com1, accounts.google.com2 and so on.

When using pass in combination with https://github.com/browserpass/browserpass the helper browser extension had a polluted list that was incredibly hard to use (you would have to click each one, or have to manually go through each and clean it up).

I tried using https://qtpass.org/, but it was too slow. I also tried using the CLI, but I wanted to automate this. Below is a quick Node.js script I wrote (with zero dependencies required). All you have to do is save it as file.js, install Node, and then run node file.js.

It goes through ~/.password-store and picks out files ending in .gpg (password store names) and excludes directories. It then iterates over each and pulls out the login and url values from the configuration. Lastly it moves the file such that the format is $login/$url.hostname. It runs serially and has some safeguards built-in.

https://gist.github.com/niftylettuce/9ab522a2c60424c071f057bc197d140b

Add Enpass 6 support

Enpass dropped csv export in version 6. Available export options are now txt or json.

Import of keepassxc fails

I'm on arch linux here (installed from AUR) and the import of our keepassxc passwords fail with

pass import -p PRADA/imported keepassxc prada-secrets.kdbx
Password for <_io.TextIOWrapper name='prada-secrets.kdbx' mode='r' encoding='utf-8'>:
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.7/site-packages/pass_import.py", line 1990, in <module>
    main(sys.argv)
  File "/usr/lib/python3.7/site-packages/pass_import.py", line 1942, in main
    importer.parse(file)
  File "/usr/lib/python3.7/site-packages/pass_import.py", line 798, in parse
    with PyKeePass(path, password) as keepass:
  File "/usr/lib/python3.7/site-packages/pykeepass/pykeepass.py", line 42, in __init__
    transformed_key=transformed_key
  File "/usr/lib/python3.7/site-packages/pykeepass/pykeepass.py", line 62, in read
    transformed_key=transformed_key
  File "/usr/lib/python3.7/site-packages/construct/core.py", line 324, in parse_file
    with open(filename, 'rb') as f:
TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper

I haven't digged into the code but it looks like pass-import is maybe delegating a wrong object as path to pykeepass?

Problems importing chrome passwords.

Problems importing chrome passwords.

Version : Version 66.0.3346.8 (Build officiel) dev (64 bits) Linux

I activated chrome://flags/#PasswordExport
I went to chrome://settings/passwords
clicked on the export menu line.
It created a Mots de passe GoogleΒ Chrome.csv file
'cat file.csv | pass import chrome' was shouting : import.FormatError
I found https://github.com/roddhjav/pass-import/blob/master/tests/db/chrome.csv
compared with the Mots* file : The first column was extra, and the headers where different.

As in :
name,url,username,password
instead of
origin_url,username_value,password_value

once corrected, everything went smoothly.

Thanks for your great job.

Import binary attachment

Hi,
I am trying to convert a keepass file in pass.
I exported the file in xml with the expectation that the binary attachment would be there but no way.

I do not see it. Is pass-import in any case capable to import them. I do not see any option for it.
Cheers

Keepass string fields

I have OTP-keys stored in Keepass. They are stored as string field with the name otp and the value key=xxxx They do not get imported even with the -e extra option

Import from LastPass mangles (shared?) folders with only one password in them

This is mostly a reminder to myself to investigate further here, so don't spend to much energy on it yourself yet, I hope to put in a PR.

But I believe this what is happening; I just used this to import my LastPass export, and there was an _etc" folder with a few files that had the name of a former folder (e.g. "myemail\Web_Hosting.gpg). Those folders had one entry in them.

These should be instead be files in myemail\Web_Hosting, like all the other entries (which were one of many in their folders), named by the name of the former lastpass entry.

Too much cleaning

Hi Alex.
In the PasswordManager method satanize you have this line:

self._clean_protocol(entry, 'url')

I do not think the URL should be cleaned like that.
I understand you use _clean_protocol() on the title because it is always used in a path name, and only for that.
But the url-property is primarily a piece of information, and we loose information if we just delete the protocol-prefix.

I propose that the _clean_protocol() method is retired and the funtionality moved to _create_path().

I would be happy to create a PR, but wanted to get your thoughts here first.

Best regards,
SΓΈren Thing

Does it import with spaces?

I used the old 2012 import script from keepassx to pass but it screwed up all the directories and password names, they don't have any empty space.

I would like to try pass-import but I can't install it easily on the old ubuntu 14.04 :'(

/usr/bin/python3: No module named pass_import

Hello,

I installed via stable instruction:

root@pinetree:/tmp/pass-import-2.4# make
zip_safe flag not set; analyzing archive contents...
green.__pycache__.cmdline.cpython-37: module references __file__
green.__pycache__.djangorunner.cpython-37: module references __file__
green.__pycache__.loader.cpython-37: module references __file__
green.__pycache__.version.cpython-37: module references __file__
green.test.__pycache__.test_cmdline.cpython-37: module references __file__
green.test.__pycache__.test_loader.cpython-37: module references __file__

Installed /tmp/pass-import-2.4/.eggs/green-2.13.0-py3.7.egg
Searching for unidecode
Reading https://pypi.org/simple/unidecode/
Downloading https://files.pythonhosted.org/packages/31/39/53096f9217b057cb049fe872b7fc7ce799a1a89b76cf917d9639e7a558b5/Unidecode-1.0.23-py2.py3-none-any.whl#sha256=092cdf7ad9d1052c50313426a625b717dab52f7ac58f859e09ea020953b1ad8f
Best match: Unidecode 1.0.23
Processing Unidecode-1.0.23-py2.py3-none-any.whl
Installing Unidecode-1.0.23-py2.py3-none-any.whl to /tmp/pass-import-2.4/.eggs

Installed /tmp/pass-import-2.4/.eggs/Unidecode-1.0.23-py3.7.egg
Searching for termstyle
Reading https://pypi.org/simple/termstyle/
Downloading https://files.pythonhosted.org/packages/65/53/4dfdfe12b499f375cc78caca9cf146c01e752bab7713de4510d35e3da306/termstyle-0.1.11.tar.gz#sha256=ef74b83698ea014112040cf32b1a093c1ab3d91c4dd18ecc03ec178fd99c9f9f
Best match: termstyle 0.1.11
Processing termstyle-0.1.11.tar.gz
Writing /tmp/easy_install-ednl4_sf/termstyle-0.1.11/setup.cfg
Running termstyle-0.1.11/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ednl4_sf/termstyle-0.1.11/egg-dist-tmp-gajse607
zip_safe flag not set; analyzing archive contents...
Moving termstyle-0.1.11-py3.7.egg to /tmp/pass-import-2.4/.eggs

Installed /tmp/pass-import-2.4/.eggs/termstyle-0.1.11-py3.7.egg
Searching for coverage
Reading https://pypi.org/simple/coverage/
Downloading https://files.pythonhosted.org/packages/10/cb/b3c1778183ec94813442d00bd60048d8edb6937d311d7f411c1ea8898948/coverage-5.0a4-cp37-cp37m-manylinux1_x86_64.whl#sha256=35d7a013874a7c927ce997350d314144ffc5465faf787bb4e46e6c4f381ef562
Best match: coverage 5.0a4
Processing coverage-5.0a4-cp37-cp37m-manylinux1_x86_64.whl
Installing coverage-5.0a4-cp37-cp37m-manylinux1_x86_64.whl to /tmp/pass-import-2.4/.eggs

Installed /tmp/pass-import-2.4/.eggs/coverage-5.0a4-py3.7-linux-x86_64.egg
Searching for colorama
Reading https://pypi.org/simple/colorama/
Downloading https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl#sha256=f8ac84de7840f5b9c4e3347b3c1eaa50f7e49c2b07596221daec5edaabbd7c48
Best match: colorama 0.4.1
Processing colorama-0.4.1-py2.py3-none-any.whl
Installing colorama-0.4.1-py2.py3-none-any.whl to /tmp/pass-import-2.4/.eggs

Installed /tmp/pass-import-2.4/.eggs/colorama-0.4.1-py3.7.egg
running build
running build_py
creating build
creating build/lib
copying pass_import.py -> build/lib

pass-import was builded succesfully. You can now install it wit "make install"

To run pass import one needs to have some tools installed on the system:
     password-store, python3 and python3-defusedxml
root@pinetree:/tmp/pass-import-2.4# make install
'import.bash' -> '//usr/lib/password-store/extensions/import.bash'
'pass-import.1' -> '//usr/share/man/man1/pass-import.1'
'completion/pass-import.bash' -> '//etc/bash_completion.d/pass-import'
running install
running install_lib
creating /usr/lib/python3.7/site-packages
copying build/lib/pass_import.py -> /usr/lib/python3.7/site-packages
byte-compiling /usr/lib/python3.7/site-packages/pass_import.py to pass_import.cpython-37.pyc
writing byte-compilation script '/tmp/tmpzvt1hbf9.py'
/usr/bin/python3 /tmp/tmpzvt1hbf9.py
removing /tmp/tmpzvt1hbf9.py
running install_egg_info
running egg_info
creating pass_import.egg-info
writing pass_import.egg-info/PKG-INFO
writing dependency_links to pass_import.egg-info/dependency_links.txt
writing requirements to pass_import.egg-info/requires.txt
writing top-level names to pass_import.egg-info/top_level.txt
writing manifest file 'pass_import.egg-info/SOURCES.txt'
reading manifest file 'pass_import.egg-info/SOURCES.txt'
writing manifest file 'pass_import.egg-info/SOURCES.txt'
Copying pass_import.egg-info to /usr/lib/python3.7/site-packages/pass_import-2.4-py3.7.egg-info
running install_scripts

pass-import is installed succesfull

But when I then tried to import a bitwarden file:

malte@pinetree:~$ pass import bitwarden bitwarden_export_20181228142058.csv
/usr/bin/python3: No module named pass_import

Did I miss something?

malte@pinetree:~$ pass --version
============================================
= pass: the standard unix password manager =
=                                          =
=                  v1.7.3                  =
=                                          =
=             Jason A. Donenfeld           =
=               [email protected]            =
=                                          =
=      http://www.passwordstore.org/       =
============================================
malte@pinetree:~$ python3 --version
Python 3.7.2rc1

Missing build prerequisites in README.md

To build (on Debian) python3-setuptools must be installed or else:

$ make
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    from setuptools import setup
ImportError: No module named 'setuptools'

Additionally due fatal error: Python.h: No such file or directory using coverage is skipped(?) if libpython3.5-dev is not installed (best done by installing python3-dev). But it apparently builds without it automatically. It is also not retried if calling make again but I have not tried to find out why/how the Makefile works or if the egg magic is saving everything.
Also s/builded/built/ in Makefile ;)

Keepass2 CVS Import fails without username

It is possible to add an entry to Keepass(X)2 only containing a password and no username.
The import script fails on such entries when it tries to create a file ".gpg"

I did a quickfix, adding "(empty)" if username is not set, but i'm not sure if this is a valid solution.
The Usecase to have means/credentials with only a password is a valid one in my opinion.

Error: file.csv is not a exported 1password file – 1Password7

Hi, I'm using 1Password (Version 7.2.5). I tried to import my exported data using pass-import, but got the following error:

$ pass import 1password /home/louis/1p.csv
 [x] Error: /home/louis/1p.csv is not a exported 1password file

I tried both with the csv and 1pif formats, neither work.

I noticed 1Password translates the headers into my locale, but keeps the original ones between parentheses, so I parsed the file to strip the translations and keep the original.

Here are my columns:

reg_name,member_since,address,branchAddress,alias,aim,issuing_authority,bank,database,reg_code,pin,telephonePin,swift,order_number,conditions,order_date,expiry_date,expiry,birthdate,issue_date,homephone,support_email,reg_email,email,publisher_name,state,expires,provider,game,icq,airport_id,admin_console_username,username,initial,birthplace,cashLimit,pop_authentication,smtp_authentication,password,admin_console_password,wireless_password,disk_password,password,password,pin,pop_password,smtp_password,password,msn,routingNo,additional_no,membership_no,accountNo,pop_port,smtp_port,reservations_phone,cvv,support_contact_phone,nationality,fullname,name,username,pop_username,smtp_username,member_name,bankName,name,company_name,network_name,cardholder,owner,lastname,name,Notes,issuenumber,iban,ccnum,number,number,options,org_name,download_link,issuing_country,country,pin,creditLimit,port,cellphone,jobtitle,firstname,retail_price,occupation,reminderq,quota,remindera,wireless_security,pop_security,smtp_security,smtp_server,hostname,pop_server,server,department,sex,sid,forumsig,provider_website,website,publisher_website,website,skype,company,company,height,interest,phoneIntl,phone_local,phoneLocal,phone_tollfree,phoneTollFree,defphone,customer_service_phone,branchPhone,phone,Titre,order_total,busphone,Type,class,accountType,database_type,pop_type,type,URL,admin_console_url,support_contact_url,url,valid_from,validFrom,product_version,yahoo

I actually removed the few remaining extra (empty) columns which were in my locale only (probably new in 1Password 7), but all the rest remains well formed.

Total number of imported passwords is wrong.

When i try to import a keepass 2.38 xml then i get alot of warnings:

  w  Impossible to insert NewDatabase/amazon.com ([email protected]) into the store: gpg: [stdin]: encryption failed: Invalid user ID
Password encryption aborted.
 CW: verify_file()
GPG:
gpg2
GPG Options:

Param 1
/home/christian/.password-store/.gpg-id
Enter contents of NewDatabase/amazon.com ([email protected]) and press Ctrl+D when finished:

These warnings are ok.

This leads "pass import" not not import the password, just creating the directory structure. Which is ok from my point of view.

But the summary is plain wrong:

 (*) Importing passwords from keepass
  .  File: /home/christian/zusammengefasst.xml
  .  Number of password imported: 1248
  .  Passwords imported:
[...]

there was not a single password imported, so "Number of password imported" should be 0 instead of 1248.

You can find my pass version, pass-import version etc. in #52

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.