diff options
Diffstat (limited to 'sql-injection')
-rw-r--r-- | sql-injection/index.html | 25 | ||||
-rw-r--r-- | sql-injection/login.php | 23 | ||||
-rw-r--r-- | sql-injection/users.db | bin | 8192 -> 0 bytes |
3 files changed, 0 insertions, 48 deletions
diff --git a/sql-injection/index.html b/sql-injection/index.html deleted file mode 100644 index d3e760b..0000000 --- a/sql-injection/index.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE HTML> -<html> - <head> - <title>Login page</title> - <meta charset="utf-8" /> -<style> -body { - text-align: center; -} - -input { - margin-bottom: 5px; -} - -</style> - </head> - <body> - <h1>Login</h1> - <form action="login.php" method="post"> - <input type="text" name="email" placeholder="E-mail"><br> - <input type="password" name="pass" placeholder="Password"><br> - <input type="submit" value="Log in"> - </form> - </body> -</html> 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(); - } -?> diff --git a/sql-injection/users.db b/sql-injection/users.db Binary files differdeleted file mode 100644 index 9ddf64e..0000000 --- a/sql-injection/users.db +++ /dev/null |