Das weiß eine Webseite über den Erstbesucher

Bist du das erste Mal hier? Oder bist du das erste Mal auf irgendeiner Seite? Ohne das du hier irgendwelche Angaben gemacht hast weiß ich das schon über dich

Der hier verwendete Code

<?php if ( (! empty($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https') || (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (! empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443') ) { // ok, all good } else { $location = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header('HTTP/1.1 301 Moved Permanently'); header('Location: '.$location); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <title>Stop Being Paranoid</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> <style> body { display: flex; min-height: 100vh; flex-direction: column; } main { flex: 1 0 auto; } .headercolor { background-color: #63A075; } .maincolor { background-color: #9CD7DE; } .footercolor { background-color: #1C70BE; } </style> </head> <body> <header class="headercolor"> <div class="container"> <!-- header --> <div class="row"> <h2 class="center-align"> Vertraue nicht allem, was du online liest </h2> </div> </div> </header> <main class="maincolor"> <div class="container"> <!-- quick description --> <div class="row"> <p class="flow-text"> <style> .description { text-align: justify; background-color: #7eaeb340; } </style> <div class="row"> <div class="col s12"> <div class="card-panel description"> <p class="flow-text"> Für diejenigen, die sich Sorgen darüber machen, was eine Website bei jedem Besuch über Sie weiß: Sehen Sie sich unten die Standardinformationen an, die eine Website beim ersten Kontakt abfragt. </p> </div> </div> </div> </p> </div> <div class="row"> <blockquote class="flow-text right"> Ihr Webbrowser... </blockquote> <table class="highlight"> <?php error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE); function displayBox($entry){ arrayAsList( array( $entry ) ); } function arrayAsList($values){ ?> <ul class="collection"> <?php foreach($values as $value){ ?><li class="collection-item"><?php echo $value; ?></li><?php } ?> </ul> <?php } function explodeOut($seperator, $data){ $values = explode($seperator, $data); arrayAsList($values); } function explodeUserAgent($agent){ $v1 = explode('(', $agent); for ($i = 1; $i < count($v1); $i++){ $v1[$i] = '('.$v1[$i]; } $v3 = Array(); foreach ($v1 as $v2){ $v22 = explode(')', $v2); for ($i = 1; $i < count($v22); $i++){ $v22[$i-1] = $v22[$i-1].')'; } $v3 = array_merge( $v3, $v22 ); } arrayAsList($v3); } function whois($ip){ return json_decode( file_get_contents( "http://ip-api.com/json/".$ip ) ); } function getDataSet(){ $keys = Array( "Sag mir, das ist deine IP-Adresse: " => Array( "key" => "REMOTE_ADDR", "action" => function($data){ // include_once 'f_whois.php'; displayBox($_SERVER[$data]); } ), " Über deine IP-Adresse: " => Array( "key" => "REMOTE_ADDR", "action" => function($data){ // include_once 'f_whois.php'; $ip = $_SERVER[$data]; $whois = whois($ip); arrayAsList( Array( $whois->city.', '.$whois->regionName.', '.$whois->country, $whois->isp, $whois->org ) ); } ), " meldet diese bevorzugte Sprache: " => Array( "key" => "HTTP_ACCEPT_LANGUAGE", "action" => function($data){ $value = $_SERVER[$data]; explodeOut(',', $value); } ), "unterstützt Dateiformate: " => Array( "key" => "HTTP_ACCEPT", "action" => function($data){ $value = $_SERVER[$data]; explodeOut(',', $value); } ), "unterstützt Kompression: " => Array( "key" => "HTTP_ACCEPT_ENCODING", "action" => function($data){ $value = $_SERVER[$data]; explodeOut(',', $value); } ), "erzählt mir das von sich: " => Array( "key" => "HTTP_USER_AGENT", "action" => function($data){ $value = $_SERVER[$data]; explodeUserAgent($value); } ), "sagt mir die Zeit ist: " => Array( "key" => "REQUEST_TIME", "action" => function($data){ // Y-m-d\TH:i:s\Z displayBox( gmdate("T h:i:s | D M Y", $_SERVER[$data]) ); } ) ); return $keys; } function template(){ $keys = Array( "template" => Array( "key" => "something", "action" => function($data){ echo "pizza"; } ) ); return $keys; } $keys = getDataSet(); // $keys = $_SERVER; foreach($keys as $key => $value){ ?><tr><th class="right-align"><?php echo $key; ?></th><?php ?><td><?php // echo $value; $value["action"]($value["key"]); ?></td><?php ?></tr><?php } ?> </table> <blockquote class="flow-text right"> Wenn du Javascript aktiviert hast, weiß ich vielleicht noch mehr... </blockquote> <table class="highlight" id="jsTable"> </table> </div> </div> </main> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> <script> getMethods = (obj) => Object.getOwnPropertyNames(obj).filter(item => typeof obj[item] === 'function'); boolStr = (bool) => (bool?"Yes":"No"); </script> <script> var dataset = { // pageon() { return ["The page you're on: ", function () { return window.location.pathname; }]; }, referrer() { return ["Die Website, die Sie hierher schickt", function () { return document.referrer; }]; }, previousSites() { return ["Wie oft Sie die Zurück-Taste drücken können", function () { return history.length; }]; }, browserName() { return ["Name deines Browsers", function () { return navigator.appName; }]; }, // browserEngine() { return ["Bowser engine", function () { return navigator.product; }]; }, // appVersion() { return ["App Vesion ", function () { return navigator.appVersion; }]; }, // userAgent() { return ["Use Agent", function () { return navigator.userAgent; }]; }, browserLanguage() { return ["Die Spracheinstellung in Ihrem Browser", function () { return navigator.language; }]; }, browserOnline() { return ["Bist du mit Netzwerk/Internet verbunden?", function () { return boolStr(navigator.onLine) }]; }, browserPlatform() { return ["Ihr Browser ist für diese Plattform kompiliert", function () { return navigator.platform; }]; }, javaEnabled() { return ["Ist Java aktiviert??", function () { return boolStr(navigator.javaEnabled()); }]; }, dataCookiesEnabled() { return ["Sind Cookies aktiviert??", function () { return boolStr(navigator.cookieEnabled); }]; }, // dataCookies1() { return ["Cookies dieser Webseite", function () { return document.cookie; }]; }, // dataCookies2() { return ["Gesplitte Daten der Cookies", function () { return decodeURIComponent(document.cookie.split(";")); }]; }, sizeScreenW() { return ["Die Höhe Ihres Computermonitors (in pixels)", function () { return screen.width; }]; }, sizeScreenH() { return ["Die Beite Ihres Computermonitors (in pixels)", function () { return screen.height; }]; }, sizeDocH() { return ["Die Höhe Ihres Browser Fensters (in pixels)", function () { return document.height; }]; }, sizeDocW() { return ["Die Breite Ihres Browser Fensters (in pixels)", function () { return document.width; }]; }, //sizeInW() { return ["Innere Breite des Fensters", function () { return innerWidth; }]; }, //sizeInH() { return ["Innere Höhe des Fesnsters", function () { return innerHeight; }]; }, sizeAvailW() { return ["Die nutzbare Menge an horizontalen Pixeln auf Ihrem Bildschirm", function () { return screen.availWidth; }]; }, sizeAvailH() { return ["Die nutzbare Menge an vertikalen Pixeln auf Ihrem Bildschirm", function () { return screen.availHeight; }]; }, scrColorDepth() { return ["Je höher diese Zahl, desto mehr Farben kann Ihr Bildschirm anzeigen", function () { return screen.colorDepth; }]; }, // scrPixelDepth() { return ["", function () { return screen.pixelDepth; }]; }, latitude() { return ["", function () { return position.coords.latitude; }]; }, longitude() { return ["", function () { return position.coords.longitude; }]; }, accuracy() { return ["", function () { return position.coords.accuracy; }]; }, altitude() { return ["", function () { return position.coords.altitude; }]; }, altitudeAccuracy() { return ["", function () { return position.coords.altitudeAccuracy; }]; }, heading() { return ["", function () { return position.coords.heading; }]; }, speed() { return ["", function () { return position.coords.speed; }]; }, timestamp() { return ["", function () { return position.timestamp} ](); } }; </script> <script> var methods = getMethods(dataset); var length = methods.length; var table = document.getElementById('jsTable'); for (let i = 0; i < length; i++) { try { // Define this seperately so it can be displayed in the console let method = methods[i]; try { let info = dataset[method](); let name = info[0].trim(); if (name == "") name = method; let output = "" + (info[1]()); // Block anything invalid from appearing on screen { let allowed = true; let filter = [ "", "[object Storage]", "undefined" ] for (let i = 0; i < filter.length; i++){ if (output == filter[i]) { allowed = false; break; } } if (!allowed){ console.log("No valid info from: " + method); continue; } } // continue let datarow = table.insertRow(); let th = document.createElement('TH'); let td = document.createElement('TD'); datarow.appendChild(th); datarow.appendChild(td); th.classList.add("right-align"); th.appendChild( document.createTextNode( name + ": " ) ); let ul = document.createElement('UL'); ul.classList.add("collection"); let li = document.createElement('LI'); li.classList.add("collection-item"); let text = ("" + output).trim(); if (text == "") text = "None"; li.appendChild( document.createTextNode( text ) ); ul.appendChild(li); td.appendChild(ul); } catch (err) { console.log("An error occured while handling: " + method); } } catch(err) { Console.log(err); } } </script> </body> </html>

Add Comment

* Required information
1000
Drag & drop images (max 3)
Powered by Commentics

Comments

No comments yet. Be the first!