aboutsummaryrefslogtreecommitdiffstats
path: root/hsrvpn-showtoken
blob: 8d0288933bcdaffd98b329f5ebc5fd98e3aafb98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python

import argparse

import keyring

parser = argparse.ArgumentParser()
parser.add_argument('user', help="HSR Username")
args = parser.parse_args()

tokens = keyring.get_password('hsrvpn-secrets', args.user).split()
print(tokens.pop(0))
keyring.set_password('hsrvpn-secrets', args.user, '\n'.join(tokens))