summaryrefslogtreecommitdiff
path: root/contrib/importers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xcontrib/importers/lastpass2pass.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/importers/lastpass2pass.rb b/contrib/importers/lastpass2pass.rb
index 41a2a29..654101b 100755
--- a/contrib/importers/lastpass2pass.rb
+++ b/contrib/importers/lastpass2pass.rb
@@ -76,7 +76,7 @@ entry = ""
begin
file = File.open(filename)
file.each do |line|
- if line =~ /^http/
+ if line =~ /^(http|ftp|ssh)/
entries.push(entry)
entry = ""
end
@@ -110,8 +110,12 @@ puts "Records parsed: #{records.length}"
successful = 0
errors = []
records.each do |r|
+ if File.exist?("#{r.name}.gpg") and FORCE == false
+ puts "skipped #{r.name}: already exists"
+ next
+ end
print "Creating record #{r.name}..."
- IO.popen("pass insert -m#{"f" if FORCE} '#{r.name}' > /dev/null", 'w') do |io|
+ IO.popen("pass insert -m '#{r.name}' > /dev/null", 'w') do |io|
io.puts r
end
if $? == 0
@@ -124,7 +128,7 @@ records.each do |r|
end
puts "#{successful} records successfully imported!"
-if errors
+if errors.length > 0
puts "There were #{errors.length} errors:"
errors.each { |e| print e.name + (e == errors.last ? ".\n" : ", ")}
puts "These probably occurred because an identically-named record already existed, or because there were multiple entries with the same name in the csv file."
='logmsg'> Based-on-work-by: Matthieu Weber <mweber@free.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 I found that revelatio2pass.py script doesn't work. It can not decrypt my password file. I got following error message: raceback (most recent call last): File "git/password-store/contrib/importers/revelation2pass.py", line 159, in <module> main(args.FILE, verbose=args.verbose, xml=args.xml) File "git/password-store/contrib/importers/revelation2pass.py", line 140, in main cleardata_gz = decrypt_gz(password, data) File "git/password-store/contrib/importers/revelation2pass.py", line 117, in decrypt_gz ct = c.decrypt(cipher_text[28:]) File "/usr/lib/python2.7/site-packages/Crypto/Cipher/blockalgo.py", line 295, in decrypt return self._cipher.decrypt(ciphertext) I was unable to fix the problem, but I created a workaround, that add plain XML import option to the revelation2pass.py script. Revelation can export its password file as plain XML format. 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17 According to Brandon Jones, all we need to do is adjust /dev/clipboard from xclip. So we add a platform specific file to do so. http://www.relaytheurgency.com/2014/04/pass-in-cygwin-relatively-simple.html Suggested-by: Brandon Jones <jones.brandon.lee@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>