aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Zelent <zelent.marcin@gmail.com>2018-05-30 18:27:51 +0200
committerMarcin Zelent <zelent.marcin@gmail.com>2018-05-30 18:27:51 +0200
commitee0bd3f7716546f679bd390d7b681fedf949b2fb (patch)
treea8b21d9c4707521dcf161bbdc7a20f622700c6f2 /sql-injection
parent7b2e079f4ef3cd3f16c6c5ca30fc3e97fd982b28 (diff)
Added buffer overflow example
Diffstat (limited to 'sql-injection')
-rw-r--r--sql-injection/index.html25
-rw-r--r--sql-injection/login.php23
-rw-r--r--sql-injection/users.dbbin8192 -> 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
deleted file mode 100644
index 9ddf64e..0000000
--- a/sql-injection/users.db
+++ /dev/null
Binary files differ