# from pymysql import * # conn = connect(host="127.0.0.1", port=3306, database="haha", user="root", password="123456", charset="utf8") # cur = conn.cursor() # key = " '' or '1'='1'" # cur.execute("select * from house where id = %s" % key) # f=cur.fetchall() # for i in f: # print(i) # # cur.close() from pymysql import * conn = connect(host="127.0.0.1", port=3306, database="haha", user="root", password="123456", charset="utf8") cur = conn.cursor() key = " ' or '1'='1" cur.execute("select * from house where id = '{}'".format(key)) f=cur.fetchall() for i in f: print(i) cur.close()
python sql 注入实例
最新推荐文章于 2024-07-06 19:58:24 发布