コード例 #1
0
def get_rec(params, uid):
    if not (uid):
        raise click.ClickException("Need to specify uid option")
    try:
        api.sync_down(params)
        if uid:
            display.print_record(params, uid)
    except Exception as e:
        raise click.ClickException(e)
コード例 #2
0
ファイル: cli.py プロジェクト: captainstatic/Commander
def rotate(params, uid, match, print):
    try:
        prompt_for_credentials(params)
        api.sync_down(params)
        if uid:
            api.rotate_password(params, uid)
            if print:
                display.print_record(params, uid)
        else:
            if filter:
                results = api.search_records(params, match)
                for r in results:
                    api.rotate_password(params, r.record_uid)
                    if print:
                        display.print_record(params, uid)
    except Exception as e:
        raise click.ClickException(e)
コード例 #3
0
def rotate(params, uid, match, print):
    if not (uid or match):
        raise click.ClickException(
            "Need to specify either uid or match option")
    try:
        api.sync_down(params)
        if uid:
            api.rotate_password(params, uid)
            if print:
                display.print_record(params, uid)
        else:
            if filter:
                results = api.search_records(params, match)
                for r in results:
                    api.rotate_password(params, r.record_uid)
                    if print:
                        display.print_record(params, uid)
    except Exception as e:
        raise click.ClickException(e)
コード例 #4
0
ファイル: get.py プロジェクト: pyrokin5/Commander
                params.password = params.config['password']

            if 'device_id' in params.config:
                device_id = base64.urlsafe_b64decode(
                    params.config['device_id'] + '==')
                params.rest_context.device_id = device_id


my_params = KeeperParams()
read_config_file(my_params)

while not my_params.user:
    my_params.user = getpass.getpass(prompt='User(Email): ', stream=None)

while not my_params.password:
    my_params.password = getpass.getpass(prompt='Master Password: '******'Record UID: ', stream=None)

api.sync_down(my_params)

# See record.py for available fields
# or call display.formatted_records(record) to show all record details
record = api.get_record(my_params, record_uid)
if record:
    print('Record Password: '******'No record found with that UID')