Advertisement
Guest User

Untitled

a guest
Mar 7th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import splunk.entity as entity
  2. import splunk.auth, splunk.search
  3. import getpass
  4. def huntPasswords(sessionKey):
  5. entities = entity.getEntities(
  6. ['admin','passwords'],owner="nobody", namespace="-",sessionKey=sessionKey)
  7. return entities
  8. def getSessionKeyFromCreds():
  9. user = raw_input("Username:")
  10. password = getpass.getpass()
  11. sessionKey = splunk.auth.getSessionKey(user,password)
  12. return sessionKey
  13. if __name__ == "__main__":
  14. sessionKey = getSessionKeyFromCreds()
  15. print huntPasswords(sessionKey)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement