Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.15 KB | None | 0 0
  1. import string
  2.  
  3. def main():
  4.     usrlogin = input('Username:')
  5.     uname = usrlogin
  6.     usrlogin += input('Password:')
  7.     f = open('usrlist.txt', 'r')
  8.     if usrlogin in str(f):
  9.         txt = uname
  10.         txt += '.txt'
  11.         vorr = input('Would you like to view or add to your passwords?')
  12.         vorr2 = vorr.lower
  13.         if vorr2 is 'view':
  14.             f = open(txt, 'r')
  15.             print(f)
  16.             f.close()
  17.         elif vorr2 is 'add':
  18.             password()
  19.     else:
  20.         print('Adding user...')
  21.         f = open('usrlist.txt', 'a')
  22.         f.write(usrlogin)
  23.         f.close()
  24.         main()
  25.        
  26. def password():
  27.     seed = input('Input:')
  28.     string.replace(seed, ' ', '')
  29.     v = 0
  30.     u = 0
  31.     for x in range(0, len(seed)):
  32.         hexstr = seed.encode('utf-8')
  33.         seed = int(hexstr)
  34.         hexstr = seed.encode('utf-8')
  35.         v += 1
  36.         if v == 2:
  37.             v = 0
  38.             string.replace(hexstr,hexstr[x], '')
  39.     for i in hexstr:
  40.         if i is [1, 3, 4, 7, 9, 11, 12]:
  41.             i.upper
  42.     string.replace(hexstr, hexstr[10], '-')
  43.     location = input('Account:')
  44.     loginfo += 'Account:' + '\n'
  45.     loginfo += location + '\n'
  46.     loginfo += '\n'
  47.     loginfo += 'Password:' + '\n'
  48.     loginfo += hexstr[range(0, 11)] + '\n'
  49.     loginfo += '\n'
  50.     f = open(txt, 'a')
  51.     f.write(loginfo)
  52.     print(f)
  53.     f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement