-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
162 lines (150 loc) · 11.5 KB
/
index.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hash My Pass | A Javascript bookmarklet to end pass</title>
<meta name="author" content="Waldir Pimenta, Abel Soares, Sérgio Laranjeira and Miguel Oliveira">
<link rel="stylesheet" href="style.css">
<script src="js/libs/modernizr-2.0.6.min.js"></script>
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<section id="page">
<!-- Defining the #page section with the section tag -->
<header>
<hgroup>
<h1>Hash My Pass</h1>
<h3>protect your passwords</h3>
</hgroup>
<!-- main site navigation -->
<nav class="clear">
<ul>
<li>
<a href="#what">What?</a>
</li>
<li>
<a href="#why">Why?</a>
</li>
<li>
<a href="#how">How?</a>
</li>
<li>
<a href="#who">Who?</a>
</li>
</ul>
</nav>
<!-- end navigation -->
</header>
<!-- end header -->
<section id="articles">
<!-- Article 1 start -->
<div class="line"></div>
<!-- Dividing line -->
<article id="how">
<h2>how it works</h2>
<div class="line"></div>
<div class="articleBody clear">
<figure>
<img src="safety.jpg" width="620" height="340" alt="" />
</figure>
<div class="buttonOver">
<h3>Drag me!</h3>
<a href="javascript:var%20j%3D8%2Ck%3D%22%22%3B%20function%20l(b%2Cd)%7Bb%5Bd%3E%3E5%5D%7C%3D128%3C%3C24-d%2532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d%2665535)%3Breturn(b%3E%3E16)%2B(d%3E%3E16)%2B(a%3E%3E16)%3C%3C16%7Ca%2665535%7D%20function%20p(b)%7Bfor(var%20d%3D%22%22%2Ca%3D0%3Ba%3Cb.length*4%3Ba%2B%3D3)for(var%20c%3D(b%5Ba%3E%3E2%5D%3E%3E8*(3-a%254)%26255)%3C%3C16%7C(b%5Ba%2B1%3E%3E2%5D%3E%3E8*(3-(a%2B1)%254)%26255)%3C%3C8%7Cb%5Ba%2B2%3E%3E2%5D%3E%3E8*(3-(a%2B2)%254)%26255%2Ce%3D0%3Be%3C4%3Be%2B%2B)d%2B%3Da*8%2Be*6%3Eb.length*32%3Fk%3A%22ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%2B%2F%22.charAt(c%3E%3E6*(3-e)%2663)%3Breturn%20d%7Dwindow.removeElement%3Dfunction(b%2Cd)%7Bdocument.body.removeChild(document.getElementById(b))%3Bdocument.body.removeChild(document.getElementById(d))%7D%3B%20function%20q(b)%7Bif(b!%3D%3D%22%22%26%26b!%3D%3Dnull)%7Bvar%20d%3Ddocument.location.href.match(%2F%5E%5B%5E%3A%5D%2B%3F%3A%5C%2F%5C%2F%5C%2F%3F(www%5Cd%3F%5C.)%3F(%5B%5E%5C%2F%5D%2B)%2F)%5B2%5D%2Ca%2Cd%3D(a%3Dd.match(%2F%5B%5E.%5D%2B(%5C.(aero%7Carpa%7Casia%7Cbiz%7Ccat%7Ccom%7Ccoop%7Cco%7Cedu%7Cgov%7Cinfo%7Cint%7Cjobs%7Cmil%7Cmobi%7Cmuseum%7Cname%7Cnet%7Corg%7Cpro%7Ctel%7Ctravel%7Cxxx))%3F(%5C.%5Ba-z%5D%7B2%7D)%3F%24%2F))%3Fa%5B0%5D%3Ad%3Ba%3D%7B%22wikipedia.org%22%3A%2F%5E(wiki(%5Bpm%5Dedia%7Cbooks%7Csource%7Cquote%7Cnews%7Cspecies)%7Cmediawiki%7Cwiktionary)%5C.org%24%2F%2C%22example.com%22%3A%2Fexample%5C.(com%7Corg%7Cnet)%2F%7D%3Bfor(var%20c%20in%20a)d.match(a%5Bc%5D)%26%26(d%3Dc)%3Bb%3Dp(l(o(b%2B%22%3A%22%2Bd)%2C(b%2B%22%3A%22%2Bd).length*j)).substr(0%2C8)%3BString.prototype.a%3D%20function(a%2Cb)%7Breturn%20this.substr(0%2Ca)%2Bb%2Bthis.substr(a%2Bb.toString().length)%7D%3Bc%3Db.charCodeAt(0)%3Ba%3Dc%25b.length%3Bb.match(%2F%5Cd%2F)%7C%7C(b%3Db.a(a%2Cc%2510))%3Bvar%20e%3Dtrue%2Ch%3D%5B%22mecanto.com%22%2C%22tvtropes.org%22%5D%2Cf%3Bfor(f%20in%20h)if(d.match(h%5Bf%5D))%7Be%3Dfalse%3Bbreak%7De%26%26(f%3Db.length-a-1%2Cf%3D%3D%3Da%26%26f%2B%2B%2Cb%3Db.a(f%2CString.fromCharCode(32%2Bc%2515)))%3Bc%3Df%3D0%3Ba%3Ddocument.forms%3Be%3Dfalse%3Bfor(f%3D0%3Bf%3Ca.length%3Bf%2B%2B)if(a%5Bf%5D.id!%3D%22HMP%22)%7Bh%3Da%5Bf%5D.elements%3Bfor(c%3D0%3Bc%3Ch.length%3Bc%2B%2B)%7Bvar%20i%3Dh%5Bc%5D%3Bif(i.type%3D%3D%3D%22password%22%7C%7Ci.type%3D%3D%3D%22text%22%26%26i.name.match(%2Fp(ass%7Cw(or)%3Fd%3F)%2Fi))i.value%3D%20b%2Ci.focus()%2Ce%3Dtrue%7D%7De%7C%7Cwindow.prompt(%22Your%20password%20for%20%22%2Bd%2B%22%20is%22%2Cb)%7D%7Dwindow.hmp%3Dq%3B%20if(typeof%20masterpw%3D%3D%3D%22undefined%22%7C%7Cmasterpw%3D%3D%3D%22%22)%7Bvar%20x%3Ddocument.createElement(%22div%22)%3Bx.setAttribute(%22id%22%2C%22overlay%22)%3Bx.setAttribute(%22style%22%2C%22height%3A100%25%3B%20width%3A100%25%3B%20position%3Afixed%3B%20left%3A0%3B%20top%3A0%3B%20z-index%3A1%20!important%3B%20background-color%3Ablack%3B%20opacity%3A%200.75%3B%22)%3Bdocument.body.appendChild(x)%3Bvar%20y%3Ddocument.createElement(%22div%22)%3By.setAttribute(%22id%22%2C%22hashMypAssBox%22)%3By.setAttribute(%22style%22%2C%22padding%3A10px%3B%20background-color%3A%20%23dfdfdf%3B%20-moz-border-radius%3A5px%3B%20-webkit-border-radius%3A5px%3Bborder-radius%3A5px%3B%20position%3Afixed%3B%20top%3A30%25%3B%20left%3A40%25%3B%20z-index%3A2!important%3B%22)%3By.innerHTML%3D%20'%3Cform%20action%3D%22%22%20method%3D%22post%22%20style%3D%22margin%3A0%22%20id%3D%22HMP%22%3E%3Clabel%20for%3D%22passwordHashMypAssword%22%3EEnter%20your%20master%20password%3C%2Flabel%3E%3Cbr%3E%3Cinput%20type%3D%22password%22%20id%3D%22passwordHashMypAssword%22%20width%3D%22100%22%20%2F%3E%3Cbr%3E%3Cinput%20type%3D%22submit%22%20name%3D%22send%22%20value%3D%22submit%22%20onclick%3D%22javascript%3Ahmp(this.previousSibling.previousSibling.value)%3B%20removeElement(%5C'hashMypAssBox%5C'%2C%5C'overlay%5C')%3B%22%3E%3Ca%20href%3D%22javascript%3AremoveElement(%5C'hashMypAssBox%5C'%2C%5C'overlay%5C')%22%20title%3D%22Close%20HashMypAss%20Box%22%20class%3D%22closeButton%22%20style%3D%22float%3Aright%3B%20font-size%3Axx-small%3B%20position%3Arelative%3B%20top%3A1em%3B%22%3E(close)%3C%2Fa%3E%3C%2Fform%3E'%3B%20document.body.appendChild(y)%3Bdocument.getElementById(%22passwordHashMypAssword%22).focus()%7Delse%20q(masterpw)%3B"
class="hashMypAssButton" title="Button to call HashMypAss">HashMypAss</a>
<p>You can login but I will always ask for your password</p>
</div>
<!--end buttonOver-->
<div class="generateButton">
<div class="hashMypAssBoxGenerate">
<form enctype="application/x-www-form-urlencoded" action="#" method="post">
<fieldset>
<legend>HashMypAss</legend>
<label for="passwordHashMypAssword">Insert your Password</label>
<input type="password" id="passwordHashMypAssword" style="width:100px;" />
<input type="submit" name="send" value="submit">
</fieldset>
</form>
</div>
<!--end hashMypAssBoxGenerate-->
<p>We will never ask your password ever again.</p>
</div>
<!--end generateButton-->
<div id="markletContainer" class="generateButton" style="display:none; margin-top:255px;">
<a href="" class="hashMypAssButton" title="Button to call HashMypAss">DragMe</a>
</div>
<div class="hashOrBox">
<h5>OR</h5>
</div>
<!--end hashOrBox-->
<div class="textArticle">
<p>Javascript bookmarklet that generates a password for a given site by hashing a master password with the site's domain.</p>
<p>Users have the advantage of memorizing only a single password, without the security problems of sharing passwords across sites.</p>
<p>The hash transformation doesn't allow anyone who has the final password to guess the master password. And since the hash is always the same, there's no need to store anything, it can simply be calculated on the fly every time it is used. As a javascript
bookmarklet, it works on the client side so the master password is never sent through the network.</p>
<p>Also, it works on any browser.</p>
</div>
<!--end textArticle-->
</div>
<!--end articleBody-->
</article>
<!-- Article 1 end -->
</section>
<footer>
<!-- Marking the footer section -->
<div class="line"></div>
<p>© 2011 - Abel, Miguel, Sérgio and Waldir</p>
<a href="#" class="up">Go UP</a>
</footer>
</section>
<!-- Closing the #page section -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/libs/jquery-1.6.2.min.js"><\/script>')
</script>
<!-- scripts concatenated and minified via ant build script-->
<script defer src="js/plugins.js"></script>
<script defer src="js/script.js"></script>
<!-- end scripts-->
<script>
// Change UA-XXXXX-X to be your site's ID
window._gaq = [
['_setAccount', 'UAXXXXXXXX1'],
['_trackPageview'],
['_trackPageLoadTime']
];
Modernizr.load({
load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
});
function pressHashMyPass() {
// The function code goes here
var overlayDiv = document.createElement('div');
var overlayDivName = 'overlay';
overlayDiv.setAttribute('id', overlayDivName);
document.body.appendChild(overlayDiv);
var newdiv = document.createElement('div');
var divIdName = 'hashMypAssBox';
newdiv.setAttribute('id', divIdName);
newdiv.innerHTML = '<form enctype="application/x-www-form-urlencoded" action="#" method="post"><fieldset><legend>HashMypAss</legend><label for="passwordHashMypAssword">Insert your Password</label><input type="password" id="passwordHashMypAssword" style="width:100px" /\><input type="submit" name="send" value="submit"></fieldset></form><a href="javascript:removeElement(\'hashMypAssBox\',\'overlay\')" title="Close HashMypAss Box" class="closeButton">Close</a>';
document.body.appendChild(newdiv);
}
function removeElement(parentDiv, childDiv) {
var parent = document.getElementById(parentDiv);
document.body.removeChild(parent);
var child = document.getElementById(childDiv);
document.body.removeChild(child);
}
$(document).ready(function () {
$('form').live('submit', function () {
var form = $(this);
var input = form.find('#passwordHashMypAssword');
console.log(input.val());
var code = $('.hashMypAssButton').attr('href');
code = code.replace(/^javascript:/, "");
$('#markletContainer a').attr('href', "javascript:var masterpw='" + input.val() + "';" + code); // TODO: url-encode the password
$('#markletContainer').show('slow');
event.preventDefault();
});
});
</script>
</body>
</html>