暂无描述

sapo_keygen.py 662B

1234567891011121314151617181920212223242526
  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("--------------------------------------------------", end = "\n\n")
  18. usr = input("Input a 7-character username: ")
  19. while(len(usr) != 7):
  20. usr = input("PLEASE input a 7-character username: ")
  21. usr = usr + '\n' + chr(0)
  22. print("Generated Password:", gen_pwd(usr))