mirror of https://gitlab.com/bashrc2/epicyon
Allow manual password entry
parent
30520ee636
commit
3b04ce6645
61
epicyon.py
61
epicyon.py
|
@ -1000,9 +1000,12 @@ if args.message:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
session = createSession(proxyType)
|
||||
if not args.sendto:
|
||||
|
@ -1072,9 +1075,12 @@ if args.announce:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
session = createSession(proxyType)
|
||||
personCache = {}
|
||||
|
@ -1092,9 +1098,12 @@ if args.announce:
|
|||
sys.exit()
|
||||
|
||||
if args.itemName:
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if not args.nickname:
|
||||
print('Specify a nickname with the --nickname option')
|
||||
|
@ -1148,9 +1157,12 @@ if args.itemName:
|
|||
sys.exit()
|
||||
|
||||
if args.undoItemName:
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if not args.nickname:
|
||||
print('Specify a nickname with the --nickname option')
|
||||
|
@ -1178,9 +1190,12 @@ if args.like:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
session = createSession(proxyType)
|
||||
personCache = {}
|
||||
|
@ -1203,9 +1218,12 @@ if args.undolike:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
session = createSession(proxyType)
|
||||
personCache = {}
|
||||
|
@ -1228,9 +1246,12 @@ if args.delete:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
session = createSession(proxyType)
|
||||
personCache = {}
|
||||
|
@ -1257,9 +1278,11 @@ if args.follow:
|
|||
print('Please specify the nickname for the account with --nickname')
|
||||
sys.exit()
|
||||
if not args.password:
|
||||
print('Please specify the password for ' + args.nickname +
|
||||
' on ' + domain)
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
followNickname = getNicknameFromActor(args.follow)
|
||||
if not followNickname:
|
||||
|
@ -1296,8 +1319,11 @@ if args.unfollow:
|
|||
print('Please specify the nickname for the account with --nickname')
|
||||
sys.exit()
|
||||
if not args.password:
|
||||
print('Please specify the password for '+args.nickname+' on '+domain)
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
followNickname = getNicknameFromActor(args.unfollow)
|
||||
if not followNickname:
|
||||
|
@ -1515,9 +1541,13 @@ if args.addaccount:
|
|||
if not validNickname(domain, nickname):
|
||||
print(nickname + ' is a reserved name. Use something different.')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
print('Use the --password option to set the password for ' + nickname)
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
if len(args.password.strip()) < 8:
|
||||
print('Password should be at least 8 characters')
|
||||
sys.exit()
|
||||
|
@ -1552,8 +1582,11 @@ if args.addgroup:
|
|||
print(nickname + ' is a reserved name. Use something different.')
|
||||
sys.exit()
|
||||
if not args.password:
|
||||
print('Use the --password option to set the password for ' + nickname)
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
if len(args.password.strip()) < 8:
|
||||
print('Password should be at least 8 characters')
|
||||
sys.exit()
|
||||
|
@ -1722,9 +1755,12 @@ if args.skill:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if not args.skillLevelPercent:
|
||||
print('Specify a skill level in the range 0-100')
|
||||
|
@ -1758,9 +1794,12 @@ if args.availability:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
session = createSession(proxyType)
|
||||
personCache = {}
|
||||
|
@ -1829,9 +1868,12 @@ if args.block:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if '@' in args.block:
|
||||
blockedDomain = args.block.split('@')[1]
|
||||
|
@ -1865,9 +1907,12 @@ if args.delegate:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if not args.project:
|
||||
print('Specify a project with the --project option')
|
||||
|
@ -1904,9 +1949,12 @@ if args.undelegate:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if not args.project:
|
||||
print('Specify a project with the --project option')
|
||||
|
@ -1939,9 +1987,12 @@ if args.unblock:
|
|||
print('Specify a nickname with the --nickname option')
|
||||
sys.exit()
|
||||
|
||||
if not args.password:
|
||||
args.password = getpass.getpass('Password: ')
|
||||
if not args.password:
|
||||
print('Specify a password with the --password option')
|
||||
sys.exit()
|
||||
args.password = args.password.replace('\n', '')
|
||||
|
||||
if '@' in args.unblock:
|
||||
blockedDomain = args.unblock.split('@')[1]
|
||||
|
|
Loading…
Reference in New Issue