diff options
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(); - } -?> |