@extends('layouts.sidebar')
@section('content')
✔️";
$wfalse = "
❌ | ";
$utrue = "❗ | ";
$ufalse = "✔️ | ";
$server = $_SERVER['SERVER_NAME'];
$uri = $_SERVER['REQUEST_URI'];
// Tests if a URL has a valid SSL certificate
function has_ssl( $domain ) {
$ssl_check = @fsockopen( 'ssl://' . $domain, 443, $errno, $errstr, 30 );
$res = !! $ssl_check;
if ( $ssl_check ) { fclose( $ssl_check ); }
return $res;
}
// Changes probed URL to HTTP if no valid SSL certificate is present, otherwise an error would be thrown
if (has_ssl($server)) {
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
} else {
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
}
//Files or directories to test if writable
$wrt1 = is_writable('.env');
$wrt2 = is_writable('database/database.sqlite');
//Files or directories to test if accessible externally
$url1 = Http::get($actual_link . '/../../.env');
$url2 = Http::get($actual_link . '/../../database/database.sqlite');
?>
Debugging information
@if($url1->successful() or $url2->successful())
Your security is at risk. Some files can be accessed by everyone. Immediate action is required!
Click this message to learn more.
@endif
Write access
Here, you can easily verify if important system files can be written to. This is important for every function to work properly. Entries marked with a '✔️' work as expected, entries marked with a '❌' do not.
File |
Hover for more |
{{ base_path(".env") }} |
0) {echo "$wtrue";} else {echo "$wfalse";} ?>
{{ base_path("database/database.sqlite") }} |
0) {echo "$wtrue";} else {echo "$wfalse";} ?>
Security
Here, you can easily verify if critical system files can be accessed externally. It is important that these files cannot be accessed, otherwise user data like passwords could get leaked. Entries marked with a '✔️' cannot be accessed externally, entries marked with a '❗' can be accessed by anyone and require immediate action to protect your data.
Link |
Hover for more |
{{ url('/.env') }} |
successful()) {echo "$utrue";} else {echo "$ufalse";} ?>
{{ url('/database/database.sqlite') }} |
successful()) {echo "$utrue";} else {echo "$ufalse";} ?>
@endsection