1pass.lua
changeset 1 0919d17b13f9
parent 0 d7ee4e2ed49d
child 5 6f80cd157c13
--- a/1pass.lua	Tue Dec 17 22:16:27 2013 -0500
+++ b/1pass.lua	Tue Dec 17 22:36:55 2013 -0500
@@ -88,7 +88,7 @@
     return nil
 end
 
-function showHint(basedir)
+local function showHint(basedir)
     local f = io.open(basedir .. "/.password.hint", "r")
     if (f == nil) then
         return
@@ -100,5 +100,22 @@
     print("(hint is '" .. str .. "').")
 end
 
+
+-- Mainline!
+
+local basedir = "1Password/1Password.agilekeychain/data/default"  -- !!! FIXME
+
+showHint(basedir)
+io.write("password: ")
+local password = io.read("*l")
+
+local sl5 = loadKey(basedir, "SL5", password)
+if sl5 == nil then
+    print("wrong password?\n")
+    os.exit(1)
+end
+
+
+
 -- end of 1pass.lua ...