一、SQL注入攻击
1、什么是SQL注入攻击
import pymysql
conn = pymysql.Connect(
user="root",
password="admin",
host="localhost",
database="day43",
charset="utf8"
)
cursor = conn.cursor(pymysql.cursors.DictCursor)
sql = "select *from user where user = '%s' and pwd = '%s';" % (input("input userName"),input("input password"))
conut=cursor.execute(sql)
print(count)
if count:
print("login success")
else:
print("login error")
cursor.close()
conn.close()
用户登录验证
继续浏览有关 数据库技术文章/教程 的文章
发表评论