-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·27 lines (24 loc) · 869 Bytes
/
index.php
File metadata and controls
executable file
·27 lines (24 loc) · 869 Bytes
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
<?php
//DON'T USE THIS, IT'S CRAP
//suppress notices because they annoy me
error_reporting(E_ALL & ~E_NOTICE);
require_once(__DIR__.'/checks.php');
require_once(__DIR__.'/sslLabsApi.php');
define("UNDETECTED","Undetected");
if (empty($_POST)){
echo "<form action=", htmlspecialchars($_SERVER["PHP_SELF"])," method=\"post\">";
echo "Site: <input type=\"text\" name=\"site\"><br>";
echo " <input type=\"submit\"></form>";
} else {
//first argument, a URL
$site= $_POST['site'];
$password = "beeblebrox";
$date = gmdate('Y-m-d H:i:s');
$api = new sslLabsApi();
$prime_ssl_check = json_decode($api->fetchHostInformation($host,false,false,false,null,'done',false),true);
$site_info = check_site($site);
$site_info['date'] = $date;
$perf = check_browsertime($site);
$ssl_scores = check_ssl($site);
write_checks($site_info,$ssl_scores,$perf);
}