Git Product home page Git Product logo

lastpass2keepass's Introduction

DESCRIPTION

Allows you to convert the LastPass export to a KeePass XML import.

REQUIRES

  • Python 2.6 (sys, csv, datetime, re, xml)

SUPPORTS

  • KeePassXML

USAGE

python lastpass2keepass.py exportedTextFile

Then import the "exportedTextFile.export.xml" into KeePassx via:

File --> Import from... --> KeePassX XML (*.xml)

TESTS/DEMO

python test_generator.py
python lastpass2keepass.py test_passwords.txt

Then import the "test_passwords.txt.export.xml" into KeePassx via:

File --> Import from... --> KeePassX XML (*.xml)

UTF-8

This is UTF-8 compliant on *nix systems, with Python 2.6.

ACKNOWLEDGEMENTS

Python XML processing with lxml, John W. Shipman, http://infohost.nmt.edu/tcc/help/pubs/pylxml/. ElementTree Overview, Fredrik Lundh, http://effbot.org/zone/element-index.htm.

COPYRIGHT

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

WARRANTY

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

lastpass2keepass's People

Contributors

anirudhjoshi avatar prikhi 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

lastpass2keepass's Issues

DTD processing

Hello!

I am trying to import a file exported from LastPass (version 3.1.40), using these instructions:
http://www.maketecheasier.com/import-keepassx-database-to-lastpass/

When I try to import the XML file generated by lastpass2keepass into KeePass, I get the following message:

For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

I get the same message when tested against the file generated by test_generator.py, then converted by lastpass2keepass.py.

I cannot find anything about this tied to KeePass AND DTDProcessing...

I ran the 12/16/2013 version of this script, using Python 2.7, under Windows 7 SP1
I am using KeePass version 2.26,

Thank you!

Thank You

At Line 146, you skipped 5 and put 6. Just change it to 5

File "lastpass2keepass.py", line 146, in
ET.SubElement(entryElement, 'lastaccess').text = str(entry[6]).decode("utf-8")
IndexError: list index out of range

This was a great time saver.

Cvs error

Hello!
Thanks for the script! It works fine with some small test files but when I tried it on a database it gives this error

Traceback (most recent call last):
File "lastpass2keepass.py", line 74, in
for x in reader:
_csv.Error: newline inside string

Do you perhaps know how to fix it? Thank you!

Could not determine delimiter

LastPass CSV export from Firefox addon running with Python 2.6.4 outputs the following error. I've verified that the CSV uses , (comma) for delimiter and I've removed all the secure notes and form fills so that there are no single column lines.

Traceback (most recent call last):
File "lastpass2keepass.py", line 48, in
dialect = csv.Sniffer().sniff(f.read(1024),delimiters=',')
File "/usr/lib/python2.6/csv.py", line 180, in sniff
raise Error, "Could not determine delimiter"
_csv.Error: Could not determine delimiter

print linebreak

Hi there ... I'm trying to convert an exported file and I'm getting this error:

File "lastpass2keepass.py", line 17
print lineBreak
^
SyntaxError: Missing parentheses in call to 'print'

I'm using Windows, thanks!

Does it work?

Using lastpass 1.69.1, get this error. AFAICS (not knowing python), there are really 2 params in function call
python 2.6.4

D:\temp>python lastpass2keepass.py 11111.csv
Traceback (most recent call last):
  File "lastpass2keepass.py", line 43, in 
    formattedPrint("Cannot write to disk... exiting.", fileError)
TypeError: formattedPrint() takes exactly 1 argument (2 given)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128)

Traceback (most recent call last):
File "lastpass2keepass.py", line 143, in
doc.write(w)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 815, in write
serialize(write, self._root, encoding, qnames, namespaces)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 934, in _serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 934, in _serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 934, in _serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 932, in _serialize_xml
write(_escape_cdata(text, encoding))
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1068, in _escape_cdata
return text.encode(encoding, "xmlcharrefreplace")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128)

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.