-
Notifications
You must be signed in to change notification settings - Fork 0
/
password.html
45 lines (41 loc) · 3.06 KB
/
password.html
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<!--
Created by Sharfa
-->
<html lang="en">
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>CyberLives</title>
<link rel="stylesheet" href="css/style.css" />
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha3.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#go").click(function(){
var pass = $("#passfield").val()
Hash = CryptoJS.SHA3(pass);
alert(Hash);
});
});
</script>
</head>
<!--Really couldn't be bother changing the styles in an external file for just this so I will use inline just this once. Don't do this at home kids.-->
<body style="background-image:none; background-color:black; color: white;">
<h2>Hash Generator</h2>
<p>Place your password in here and it will generate a hash of the password that can be used in the login page (see below).</p>
<input id="passfield"></input> <button id="go">Generate Password</button>
<h2 style="display:block">So what do you do now?</h2>
Basically every passworded section has 3 pages that gets it to work these being (the examples from Violet diaries are in brackets):
<ol>
<li>The login page (violet.html)</li>
<li>The redirect page (Amadeus.html)</li>
<li>The content page (violetcontent.html)</li>
</ol>
<p>The login page is where you type the credentials, ie. the password. This page can have any name and it is where the part which is opened from the rest of the website. This page takes a SHA3 hash of the password and compares it to a stored SHA3 hash of the password in the javascript (have fun reversing that). It then opens a page with the same name as the password. This means that the password is not stored on the page and the link cannot be extracted either. The only cavet is that you can not have 2 of the same password for 2 different login sections. So if you have password1 as the login for Roland's diaries then Violet's diary password can't be can't be password1.</p>
<p>The redirect page is where the browser takes you after accepting the login credentials. It's name is password.html where password is the password specified from the login. This page only contains javascript to redirect you to the content page as well as a link to the content page if the javascript fails.</p>
<p>The content page is where the actual content that you want to be protected is loaded. No special Javascript here, just whatever you want to display.</p>
<hr/>
If all else fails just message me and I'll do it for you. If you don't know who I am and you don't know how to get into contact with me then you probably shouldn't be looking at this page ;)
</body>
</html>