Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>Privacy Test</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script lang="--Javascript">
- function writeString(form) {
- uIn = form.usernameBox.value; // get user's input
- pIn = form.passwordBox.value; // get user's input
- uIP = "not avalible!"; // default value
- uDev = "not avalible!"; // default value
- // detect device (if none, PC/Other)
- if (/Android/i.test(navigator.userAgent)) {
- uDev = "Android";
- } else if(/webOS/i.test(navigator.userAgent)){
- uDev = "webOS";
- } else if(/iPhone/i.test(navigator.userAgent)){
- uDev = "iPhone";
- } else if(/iPad/i.test(navigator.userAgent)){
- uDev = "iPad";
- } else if(/iPod/i.test(navigator.userAgent)){
- uDev = "iPod";
- } else if(/Blackberry/i.test(navigator.userAgent)){
- uDev = "Blackberry";
- } else if(/BB/i.test(navigator.userAgent)){
- uDev = "BB";
- } else if(/PlayBook/i.test(navigator.userAgent)){
- uDev = "PlayBook";
- } else if(/IEMobile/i.test(navigator.userAgent)){
- uDev = "IEMobile";
- } else if(/Windows Phone/i.test(navigator.userAgent)){
- uDev = "Windows Phone";
- } else if(/Kindle/i.test(navigator.userAgent)){
- uDev = "Kindle";
- } else if(/Silk/i.test(navigator.userAgent)){
- uDev = "Silk";
- } else if(/Opera Mini/i.test(navigator.userAgent)){
- uDev = "Opera Mini";
- } else {
- uDev = "PC/Other"
- }
- // clear input boxes
- form.usernameBox.value = "";
- form.passwordBox.value = "";
- // print findings to the "resultText" paragraph in HTML
- document.getElementById("resultText").innerText = "Username: " + uIn + "\nPassword: " + pIn + "\nIP: " + uIP + "\nDevice: " + uDev;
- }
- </SCRIPT>
- </head>
- <body>
- <h1 style="text-align: center">Privacy Test</h1>
- <p style="text-align: center">Welcome to the Privacy Test website! On this page, you will be able to test your privacy practises & find out what infomation websites can gain from you after entering your username and password. <strong>This website is purely clientside & we do not use any of this infomation.</strong>.</p>
- <!--Input-->
- <form name="signupForm" action="" method="GET">
- <fieldset>
- <legend>Signup</legend>
- <p>Username:</p>
- <input type="text" name="usernameBox" value="">
- <p>Password:</p>
- <input type="text" name="passwordBox" value="">
- <br><br>
- <input type="button" name="signupButton" value="Signup" onClick="writeString(this.form)">
- </fieldset>
- </form>
- <!--Output-->
- <fieldset>
- <legend>Result</legend>
- <p id="resultText">The results will appear in this box once you have pressed the "Submit" button.</p>
- </fieldset>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement