-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathindex.html
260 lines (233 loc) · 12.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html>
<html>
<head>
<title>Password Score</title>
<link rel="stylesheet" type="text/css" href="docs/css/bootstrap.css">
<script type="text/javascript" src="docs/js/jquery.js"></script>
<script type="text/javascript" src="docs/js/jquery.tmpl.js"></script>
<script type="text/javascript" src="dist/js/password-score.js"></script>
<script type="text/javascript" src="dist/js/password-score-options.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML'></script>
<script type="text/javascript">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
</head>
<body>
<a href="https://github.com/davidstutz/password-score"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
<div class="container">
<h1>Password Score</h1>
<hr>
<ul class="nav nav-pills">
<li class="active"><a href="#">Demo</a></li>
<li><a href="statistics.html">Statistics</a></li>
<li><a href="api.html">API</a></li>
<li><a href="docs.html">Documentation</a></li>
<li><a href="tests/SpecRunner.html" target="_blank">Tests</a></li>
</ul>
<hr>
<script type="text/javascript">
var dictionaries = {
'dictionaries': {
'en': 'data/json/en.json',
'de': 'data/json/de.json'
},
'countries': {
'en' : 'data/json/countries-en.json',
'de': 'data/json/countries-de.json'
},
'passwords': 'data/json/passwords.json',
'last': 'data/json/last.json',
'male': 'data/json/male.json',
'female': 'data/json/female.json',
'cities': 'data/json/cities.json'
};
var colors = [
'red',
'blue',
'yellow',
'green'
];
function renderResult(score) {
var $container = $('.result');
var $ul = $('ul', $container).html('');
var $crack = $('.crack', $container).text('');
$.template('match', '<li><span class="result-match">${match}</span><span class="result-entropy">${entropy}</span><span class="result-description">${description}</span></li>');
$.template('sum', '<li><span class="result-match">∑</span><span class="result-entropy">${entropy}</span></li>');
var matches = score.cache.minimumMatches.reverse();
for (var i = 0; i < matches.length; i++) {
$.tmpl('match', {
match: matches[i].pattern,
entropy: matches[i].entropy.toFixed(2),
description: ''
}).appendTo($ul);
}
$.tmpl('sum', {
entropy: score.cache.entropy.toFixed(2)
}).appendTo($ul);
var cores = 4;
var timeToCrack = score.calculateAverageTimeToCrack(score.cache.entropy, cores);
var unit = 'seconds';
if (timeToCrack > 60) {
timeToCrack /= 60;
unit = 'minutes';
if (timeToCrack > 60) {
timeToCrack /= 60;
unit = 'hours';
if (timeToCrack > 24) {
timeToCrack /= 24;
unit = 'days';
if (timeToCrack > 365) {
timeToCrack /= 365;
unit = 'years';
}
}
}
}
$crack.text('Cracked on average within ' + timeToCrack.toFixed(2) + ' ' + unit + ' using ' + cores + ' parallel cores ...');
$container.show();
}
$(document).ready(function() {
$('#score').attr('disabled', false).removeClass('disabled');
$('#score').on('click', function() {
var password = $('#password').val();
var score = new Score(password);
var entropy = score.calculateEntropyScore();
renderResult(score);
});
$('.password').on('click', function(event) {
event.preventDefault();
$('#password').val($(this).data('value'));
$('#score').click();
});
});
</script>
<p class="alert alert-info">
<b>See how to use Password Score by having a look on several <a href="https://github.com/davidstutz/bootstrap-strength-meter">Strength Meters for Twitter Bootstrap</a>.</b>
</p>
<p class="alert alert-info">
Consider <a href="https://davidstutz.de/donate/">donating</a> to support development.
</p>
<p class="alert alert-info">
<b>Enter a password or click on one of the common passwords below</b>. Password Score will give a realistic estimation of its strength expressed in entropy. Let $h$ be the entropy of the password, then a cracker does not need to try more than $2^h$ different passwords before finding the correct one.
</p>
</div>
<div class="container">
<div class="result" style="display:none;">
<ul>
</ul>
<div class="clearfix"></div>
<div class="crack">
</div>
</div>
</div>
<div class="stripe">
<div class="container">
<div class="input-group">
<input type="text" class="form-control" id="password" placeholder="Enter your password..." />
<span class="input-group-btn">
<button class="btn btn-primary disabled" id="score" type="button" disabled >Score!</button>
</span>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="examples">
<p>
<a href="#" class="password" data-value="qwerty">qwerty</a>
<a href="#" class="password" data-value="password">password</a>
<a href="#" class="password" data-value="test1234">test1234</a>
<a href="#" class="password" data-value="admin123">admin123</a>
<a href="#" class="password" data-value="letmein">letmein</a>
<a href="#" class="password" data-value="87654321">87654321</a>
<a href="#" class="password" data-value="87654321">87654321</a>
<a href="#" class="password" data-value="elliotsmith">elliotsmith</a>
<a href="#" class="password" data-value="asdfqwer">asdfqwer</a>
<a href="#" class="password" data-value="777777">777777</a>
<a href="#" class="password" data-value="password1">password1</a>
<a href="#" class="password" data-value="liverpool">liverpool</a>
<a href="#" class="password" data-value="qwerty12">qwerty12</a>
<a href="#" class="password" data-value="office">office</a>
<a href="#" class="password" data-value="kristina">kristina</a>
<a href="#" class="password" data-value="qwertyuiop">qwertyuiop</a>
<a href="#" class="password" data-value="Bangladesh">Bangladesh</a>
<a href="#" class="password" data-value="Greenland">Greenland</a>
<a href="#" class="password" data-value="Germany">Germany</a>
<a href="#" class="password" data-value="Berlin">Berlin</a>
<a href="#" class="password" data-value="Hannover">Hannover</a>
<a href="#" class="password" data-value="Cambridge">Cambridge</a>
<a href="#" class="password" data-value="computerscience">computerscience</a>
<a href="#" class="password" data-value="ilovecomputerscience">ilovecomputerscience</a>
<a href="#" class="password" data-value="ichliebeinformatik">ichliebeinformatik</a>
<a href="#" class="password" data-value="qwertyuiop">qwertyuiop</a>
<a href="#" class="password" data-value="Bangladesh">Bangladesh</a>
<a href="#" class="password" data-value="CoMpUtErScIeNcE">CoMpUtErScIeNcE</a>
<a href="#" class="password" data-value="qayxswedcvfr">qayxswedcvfr</a>
<a href="#" class="password" data-value="123698745">123698745</a>
</p>
</div>
</div>
<div class="col-md-8">
<div class="introduction">
<p>
<b>Password Score</b> is designed to estimate the strength of a password as realistic as possible. The strength of a password will be expressed in the means of entropy. When given the entropy of a password the time to crack can easily be calculated. For giving a realistic estimation Password Score searches the password for patterns like english words, common passwords, names or even keyboard patterns.
</p>
<p>
Password Score is no graphical strength meter - it only provides a javascript library to estimate the strength of passwords expressed in entropy.
</p>
<p>
Password Score is available on <a href="https://github.com/davidstutz/password-score">GitHub</a> and an introduction can be found <a href="docs.html">here</a>
</p>
</div>
</div>
</div>
<div class="well well-lg">
<ul class="options">
<li>
<span class="glyphicon glyphicon-book"></span>
Dictionaries
</li>
<li>
<span class="glyphicon glyphicon-asterisk"></span>
Common Passwords
</li>
<li>
<span class="glyphicon glyphicon-user"></span>
Names
</li>
<li>
<span class="glyphicon glyphicon-home"></span>
Cities
</li>
<li>
<span class="glyphicon glyphicon-calendar"></span>
Dates
</li>
<li>
<h3>1337</h3>
Leet Speak
</li>
<li>
<img src="docs/img/keyboard.png" />
Keyboard Patterns
</li>
<li>
<h3>123456</h3>
Sequences/
Repetitions
</li>
</ul>
</div>
</div>
<hr>
<div class="container">
<p>
© 2013 - 2020
<a href="http://davidstutz.de">David Stutz</a> - <a href="http://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause License</a> - <a href="https://davidstutz.de/impressum/">Impressum</a> - <a href="https://davidstutz.de/datenschutz/">Datenschutz</a>
</p>
</div>
</body>
</html>