FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
HackMe-SQL-Injection-Challenges/mysql.php at master · breakthenet/HackMe-SQL-Injection-Challenges · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
breakthenet
/
HackMe-SQL-Injection-Challenges
Public
Notifications
You must be signed in to change notification settings
Fork
46
Star
414
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
HackMe-SQL-Injection-Challenges
/
mysql.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
7 lines (6 loc) · 279 Bytes
Breadcrumbs
HackMe-SQL-Injection-Challenges
/
mysql.php
Copy path
File metadata and controls
7 lines (6 loc) · 279 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
<?php
$
mysql_string
=
getenv
(
'
CLEARDB_DATABASE_URL
'
);
$
mysql_url
=
parse_url
(
$
mysql_string
);
$
c
=
mysql_connect
(
$
mysql_url
[
'
host
'
],
$
mysql_url
[
'
user
'
],
$
mysql_url
[
'
pass
'
])
or
die
(
mysql_error
());
$
db_name
=
str_replace
(
"
/
"
,
""
,
$
mysql_url
[
'
path
'
]);
mysql_select_db
(
$
db_name
,
$
c
);
Back
|
FazBrowse Home
|
New Git URL