Brak opisu

sapo_keygen.py 656B

123456789101112131415161718192021222324252627
  1. def gen_pwd(usr):
  2. generated = ""
  3. foo = ord(usr[1]) // 3
  4. for i in range(len(usr)):
  5. foo = (ord(usr[i]) ^ foo) & 0x3c
  6. generated += (chr(foo + 0x30))
  7. foo *= 3
  8. return generated
  9. #program header *1337*
  10. print(""" _
  11. ^-)
  12. (.._
  13. \`\\\\
  14. |>
  15. /| flamingo
  16. `""")
  17. print("--------------------------------------------------")
  18. print()
  19. usr = input("Input a 7-character username: ")
  20. while(len(usr) != 7):
  21. usr = input("PLEASE input a 7-character username: ")
  22. usr = usr + '\n' + chr(0)
  23. print("Generated Password:", gen_pwd(usr))