login procedure in login.py. Proof of concept
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import pymongo
|
||||
import getpass
|
||||
|
||||
myclient = pymongo.MongoClient("mongodb://admin:pass@localhost:27017/")
|
||||
username = input("Username: ")
|
||||
password = getpass.getpass("Password: ")
|
||||
|
||||
mydb = myclient["groclist_db"]
|
||||
mycol = mydb["groclist_users"]
|
||||
|
||||
#mydict = {"username": username, "password": enc_password}
|
||||
if mycol.find_one({"username": username, "password": password}):
|
||||
print("login success\n")
|
||||
exit()
|
||||
else:
|
||||
print("Login Failed")
|
||||
|
||||
Reference in New Issue
Block a user