diff options
author | Marcin Zelent <zelent.marcin@gmail.com> | 2018-05-30 18:27:51 +0200 |
---|---|---|
committer | Marcin Zelent <zelent.marcin@gmail.com> | 2018-05-30 18:27:51 +0200 |
commit | ee0bd3f7716546f679bd390d7b681fedf949b2fb (patch) | |
tree | a8b21d9c4707521dcf161bbdc7a20f622700c6f2 /sql-injection/login.php | |
parent | 7b2e079f4ef3cd3f16c6c5ca30fc3e97fd982b28 (diff) |
Added buffer overflow example
Diffstat (limited to 'sql-injection/login.php')
-rw-r--r-- | sql-injection/login.php | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/sql-injection/login.php b/sql-injection/login.php deleted file mode 100644 index 826c38c..0000000 --- a/sql-injection/login.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - class MyDB extends SQLite3 { - function __construct() { - $this->open('users.db'); - } - } - - if(isset($_POST['email'], $_POST['pass'])) - { - $email = $_POST['email']; - $pass = $_POST['pass']; - - $db = new MyDB(); - - $sql = 'SELECT * FROM Users WHERE email=\''.$email.'\' AND password=\''.$pass.'\''; - - $ret = $db->query($sql); - while($row = $ret->fetchArray(SQLITE3_ASSOC)) { - echo 'Logged in as '.$row['email'].'<br>'; - } - $db->close(); - } -?> |