Skip to content

Commit ea648a1

Browse files
committed
sql injection demo
1 parent c1a93a5 commit ea648a1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎web/sqli/app.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def tbl_post03():
7171
random_string = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(10))
7272
user = 'anonymous' + '-' + random_string
7373
# check if the user already exists
74-
return_type = model.is_exist_user(user)
74+
return_type, rows = model.is_exist_user(user)
7575
if return_type:
7676
return render_template("case03.html", error='user already exists / had exception')
7777

‎web/sqli/models/tblpost03.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ def is_exist_user(self, user):
6363
print(e)
6464
cursor.close()
6565
self.db.conn.close()
66-
return False
66+
return False, e

0 commit comments

Comments
 (0)