-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.php
57 lines (51 loc) · 1.28 KB
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title>Install XSS Lab</title>
<link rel="stylesheet" type="text/css" href="../Files/style.css">
</head>
<body>
</body>
</html>
<?php
$mysqlHostName = "localhost";
$mysqlUserName = "root";
$mysqlPassword = "";
$mysqlDatabaseName = "xss";
try
{
$connect = new PDO("mysql:host=$mysqlHostName","$mysqlUserName","$mysqlPassword");
if ($connect){
$connect->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$sql = "CREATE DATABASE IF NOT EXISTS xss";
$stmt = $connect->prepare($sql);
$create_db = $stmt->execute();
if ($create_db){
//use created db
$sql = "USE $mysqlDatabaseName";
$stmt = $connect->prepare($sql);
$use_db = $stmt->execute();
if ($use_db){
//create table
$sql = "CREATE TABLE IF NOT EXISTS comments (
id int(255) NOT NULL AUTO_INCREMENT PRIMARY KEY,
input longtext COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8";
$stmt = $connect->prepare($sql);
$create_table = $stmt->execute();
if ($create_table){
}
}
}
}
}
catch(PDOException $e)
{
echo "Erro: ".$e->getMessage();
}
$connect = null;
//Code By B14CK SPID3R
//Ashiyane Digital Security Team
//Yaho0 ID : [email protected]
//Go0D LuCK bro ...
?>