Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 761e669

Browse files
committed
+ Bootstrap 3 css
1 parent afe03b9 commit 761e669

File tree

3 files changed

+47
-20
lines changed

3 files changed

+47
-20
lines changed

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,4 @@ Open it in your browser.
99
For example: `http://your-website.com/path/to/security-check.php`
1010

1111
Then, you can view a report of the security check on your PHP installation.
12-
```
13-
Loaded Extensions Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, pdo_mysql, zip
14-
Running platform Linux
15-
safe_mode VULNERABLE
16-
Can view /etc/passwd VULNERABLE
17-
Can view /etc/shadow PASSED
18-
Shell via "system" command VULNERABLE
19-
Shell via "shell_exec" command VULNERABLE
20-
Shell via "exec" command VULNERABLE
21-
Shell via "passtrhu" command PASSED
22-
Shell via "proc_open" command VULNERABLE
23-
Shell via "popen" command VULNERABLE
24-
```
12+
![Secure Your PHP report](screenshot.png)

screenshot.png

22.4 KB
Loading

security-check.php

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,50 @@ function disabled_functions()
7272
return !is_callable('popen') && !in_array('popen', disabled_functions());
7373
}
7474
);
75+
?>
76+
<!DOCTYPE html>
77+
<html lang="en">
78+
<head>
79+
<meta charset="utf-8">
80+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
81+
<meta name="viewport" content="width=device-width, initial-scale=1">
82+
<title>Secure your PHP v0.1</title>
83+
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" />
84+
<!--[if lt IE 9]>
85+
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
86+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
87+
<![endif]-->
88+
</head>
89+
<body>
90+
<div class="container">
91+
<h1 class="page-header">Secure your PHP v0.1</h1>
92+
<div class="table-responsive">
93+
<table class="table table-bordered" border="1">
94+
<thead><tr><th>Check</th><th>Status</th></tr></thead>
95+
<tbody>
96+
<?php
97+
foreach ($security_checks as $security_check => $func) {
98+
if (is_callable($func)) {
99+
$ret = $func();
100+
echo '<tr><td>', $security_check, '</td>';
101+
echo '<td>';
102+
if (!$ret) {
103+
echo '<i class="glyphicon glyphicon-remove"></i> <span class="text-danger">VULNERABLE</span>';
104+
} elseif ($ret === true) {
105+
echo '<i class="glyphicon glyphicon-ok"></i> <span class="text-success">PASSED</span>';
106+
} else {
107+
echo $ret;
108+
}
109+
echo '</td></tr>';
110+
}
111+
}
112+
?>
113+
</tbody>
114+
</table>
115+
</div>
116+
</div>
75117

76-
echo '<pre>';
77-
foreach ($security_checks as $security_check => $func) {
78-
if (is_callable($func)) {
79-
$ret = $func();
80-
echo $security_check, ' ', !$ret ? 'VULNERABLE' : ($ret === true ? 'PASSED' : $ret), PHP_EOL;
81-
}
82-
}
118+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
119+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
120+
</body>
121+
</html>

0 commit comments

Comments
 (0)