Create new challenge Docker image
This commit is contained in:
12
countries_list/docker/add_flag.php
Normal file
12
countries_list/docker/add_flag.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
// First, connect to database
|
||||
try {
|
||||
$db = new PDO('sqlite:/var/www/html/database.db');
|
||||
} catch (PDOException $e) {
|
||||
echo 'Connection to database failed: ' . $e->getMessage();
|
||||
}
|
||||
|
||||
|
||||
$stmt = $db->prepare("INSERT INTO secret (flag) VALUES (?)");
|
||||
$stmt->execute(array(getenv("FLAG")));
|
||||
Reference in New Issue
Block a user