My code right now is
import mysql.connector import hashlib
cnx = mysql.connector.connect(user='root', password='!Joshua1',
host='127.0.0.1',
database='passwordhashtest')
cursor = cnx.cursor()
Password = input("Enter the password >>")
hashpass = hashlib.md5(Password.encode('utf8')).hexdigest()
Email=input("number")
passwordcheck='''SELECT b FROM password2 WHERE a = %s AND b = %s'''
values=(Email,hashpass)
cursor.execute(passwordcheck,values)
hashedpassindatabase=cursor.fetchone()
print(hashedpassindatabase)
if hashedpassindatabase==hashpass:
print("Success!") else:
print("error")`
My output comes out as:
('d1133275ee2118be63a577af759fc052',)
error
See my problem is the quotes and the comma! HOW DO I REMOVE THAT!?!?!??!
It seems impossible, i tried everything i can think of!
hashpass is stored as
d1133275ee2118be63a577af759fc052
If the data im getting from mysql doesnt include the quotes and the comma, then things would get verified pretty easily, but it isnt. THATS WHAT I DONT GET!!!!!!!!! HELP!!!!!!!!!!!!