FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cacti/scripts/sql.php at develop · Cacti/cacti · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Cacti
/
cacti
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
444
Star
1.9k
Code
Issues
320
Pull requests
26
Discussions
Actions
Projects
Wiki
Security and quality
67
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
cacti
/
scripts
/
sql.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
20 lines (12 loc) · 512 Bytes
Breadcrumbs
cacti
/
scripts
/
sql.php
Copy path
File metadata and controls
executable file
·
20 lines (12 loc) · 512 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
error_reporting
(
0
);
include
(
__DIR__
.
'
/../include/cli_check.php
'
);
global
$
database_hostname
,
$
database_username
,
$
database_password
;
$
cmd
=
'
mysqladmin -h
'
.
cacti_escapeshellarg
(
$
database_hostname
) .
'
-u
'
.
cacti_escapeshellarg
(
$
database_username
);
if
(
$
database_password
!=
''
) {
$
cmd
.=
'
-p
'
.
cacti_escapeshellarg
(
$
database_password
);
}
$
cmd
.=
"
status | awk '{print
\$
6 }'
"
;
$
sql
=
shell_exec
(
$
cmd
);
// Cacti expects 'U' on error, not empty string or 0.
print
trim
(
$
sql
??
''
) ?:
'
U
'
;
Back
|
FazBrowse Home
|
New Git URL