-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnect.php
More file actions
50 lines (31 loc) · 1.27 KB
/
connect.php
File metadata and controls
50 lines (31 loc) · 1.27 KB
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
<?php
/*
bWAPP, or a buggy web application, is a free and open source deliberately insecure web application.
It helps security enthusiasts, developers and students to discover and to prevent web vulnerabilities.
bWAPP covers all major known web vulnerabilities, including all risks from the OWASP Top 10 project!
It is for security-testing and educational purposes only.
Enjoy!
Malik Mesellem
Twitter: @MME_IT
bWAPP is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (http://creativecommons.org/licenses/by-nc-nd/4.0/). Copyright © 2014 MME BVBA. All rights reserved.
*/
// Connection settings
include("config.inc.php");
// Connects to the server
$link = mysql_connect($server, $username, $password);
// Checks the connection
if(!$link)
{
// @mail($recipient, "Could not connect to server: ", mysql_error());
die("Could not connect to the server: " . mysql_error());
}
// Connects to the database
$database = mysql_select_db($database, $link);
// Checks the connection
if(!$database)
{
// @mail($recipient, "Could not connect to database: ", mysql_error());
die("Could not connect to the database: " . mysql_error());
}
// mysql_close($link);
?>