示例#1
0
文件: main.py 项目: vegarwe/sqrl
def run(manager, url, cps):
    accounts = manager.list_accounts()
    if not accounts:
        print "No account(s) found"
        return

    #masterkey = unlock_account(manager)
    masterkey = manager.get_key('f')

    if not masterkey:
        print "Invalid Password"
        return

    sqrlclient = Client(masterkey, cps)
    success, data = sqrlclient.login(url)
    if success:
        print "Authenticated"
        if data:
            print "On Linux, run xdg-open %s" % data
    else:
        print "Authentication failed", data
示例#2
0
文件: main.py 项目: vegarwe/sqrl
def disable(manager, url):
    masterkey = manager.get_key('f')
    sqrlclient = Client(masterkey)
    success, data = sqrlclient.disable_account(url)
    print success, data