-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
192 lines (170 loc) · 9.8 KB
/
index.html
File metadata and controls
192 lines (170 loc) · 9.8 KB
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
<!DOCTYPE html>
<html lang="en" manifest="nullpass.appcache">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="NullPass+ provides you with a unique password for every service you use without the cumbersome task of managing a password file!">
<meta name="author" content="Adam MacLeod & JM Alarcón">
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="favicons/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="favicons/manifest.json">
<link rel="mask-icon" href="favicons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicons/mstile-144x144.png">
<meta name="msapplication-config" content="favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<title>NullPass+</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<style>
input {
margin-bottom: 4px;
}
#password {
font-family: 'Inconsolata', monospace;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-4 col-sm-push-8">
<h1>∅Pass+</h1>
<form role="form">
<input type="text" id="resource" class="form-control frm-input" placeholder="Resource name" required autofocus autocomplete="off">
<input type="password" id="master" class="form-control frm-input" placeholder="Master password" required>
<input type="number" id="length" class="form-control frm-input" value="12" required autocomplete="off">
<div class="input-group">
<input type="text" id="password" class="form-control well well-sm" placeholder="Resulting password" readonly>
<div id="reveal" class="input-group-addon">
<span class="glyphicon glyphicon-eye-open"></span>
</div>
</div>
</form>
</div><!-- /column -->
<div class="col-xs-12 col-sm-8 col-sm-pull-4">
<div id="about">
<h1>What is ∅Pass+?</h1>
<h2>Easy</h2>
<p>
NullPass+ is a password manager that doesn't require you to manage a password file. This is accomplished by combining a <strong>single master password</strong> with a site specific token (often the resource name or the account or resource name that you want to get a passwod for) to generate a unique password. This password is cryptographically secure and your original password is unrecoverable should an attacker manage to obtain your unique site password. This means an attack on one of the sites you visit will not disclose your password to any other services - keeping your accounts safe.
</p>
<h2>Secure</h2>
<p>
NullPass+ does not store any information that you enter, in fact your passwords never even leave your computer! When you enter information into the NullPass+ form there is some client side code that exectues <strong>inside your own browser</strong> which does not transmit your information to our servers or the Internet at all.
</p>
<h2>Mobile and offline</h2>
<p>
NullPass+ works on mobile devices and it doesn't need any connection to the internet in order to work. You can pin it to your mobile device's Home Screen to have it always available, even when you're off-line.
</p>
<h2>Open</h2>
<p>
If you are interested, NullPass+ works by calculating <code>SHA-512("length" + "your password" + "resource")</code>, truncating the result to <em>length</em> and adding a symbol in the middle to allow for complexity requirements. You can see this in effect by viewing the source of this webpage, or you can view/fork the project on <a href="https://github.com/jmalarcon/NullPassPlus">GitHub</a>!
</p>
<p>
NullPass+ stands on the shoulders of giants. The following projects were instrumental to the creation of NullPass+:
<a href="https://github.com/adammacleod/nullpass">NullPass by Adam Macleod</a> (the base for this project),
<a href="http://caligatio.github.io/jsSHA/">jsSHA</a>,
<a href="http://getbootstrap.com/">Bootstrap</a>,
<a href="http://jquery.com/">jQuery</a> &
<a href="https://github.com/">GitHub</a>.
</p>
</div>
<div id="contact">
<h1>Contact</h1>
<p>I'm Jose Alarcon and you can visit me at <a href="http://www.jasoft.org">JASoft.org</a>, <a href="https://github.com/jmalarcon">GitHub</a> or <a href="https://twitter.com/jm_alarcon/">Tweet to me</a>.</p>
<p>I modified the <a href="https://github.com/adammacleod/nullpass">original project by Adam Macleod</a> to allow it to work off-line, to ensure that at least a symbol is always included, to be able to pin it to the home screen in mobile phones and Windows OS, and to allow copying the generated password more more easily from mobile phones. <a href="https://github.com/jmalarcon/nullpass">Source code for this version & more details on Github</a></p>
</div>
</div><!-- /column -->
</div><!-- /row -->
</div> <!-- /container -->
<script src="js/jquery-1.12.4.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/sha512.js"></script>
<script>
var pwd = '';
//Gets a symbol to add to the password using a simple mapping for characters
function getSymbolFromChar(char){
var symbols = "@#$%&[]{}_!()*";
var charCode = char.charCodeAt(0); //Unicode for the character
var sym = charCode%symbols.length; //modulus to get a corrresponding symbol
return symbols.substring(sym,sym+1);
}
function generatePassword(master, resource, length) {
var pass = length + master + resource.trim().toLowerCase();
var shaObj = new jsSHA(pass, "TEXT");
var hash = shaObj.getHash("SHA-512", "B64");
hash = hash.substring(0,length);
//Substitute char in the middle with a symbol
var midPass = Math.floor(hash.length/2);
var sym = getSymbolFromChar(hash[midPass]); //Symbol to substitute (in the middle of the hash string)
return hash.substring(0,midPass) + sym + hash.substring(midPass+1); //Hash with changed symbol in the middle
}
function maskedPassword(){
return Array(pwd.length+1).join('•');
}
function updatePassword(){
var master = $('#master')[0].value;
var resource = $('#resource')[0].value;
if (master == '' || resource == '')
return;
var length = Math.floor($('#length').val());
//Check length. Less than 6 or more than 88 is not allowed (the hash is 88 in length and less than 6 is nonsense)
if (isNaN(length) || length < 6){
length = 6;
//$('#length').val('6');
}
if (length > 88){
length = 88;
$('#length').val('88');
}
pwd = generatePassword(master, resource, length);
$('#password').val(maskedPassword());
}
function revealPassword() {
if (pwd != '')
$('#password').val(pwd);
}
function hidePassword() {
if (pwd != '')
$('#password').val(maskedPassword());
}
$(document).ready(function() {
$('.frm-input').keyup(updatePassword).mouseup(updatePassword);
$('#reveal').on('mousedown touchstart', revealPassword).on('mouseup touchend', hidePassword);
$('#password').on('focus', function(){
revealPassword();
this.select();
document.execCommand('copy');
hidePassword();
$(this).tooltip({
trigger: 'manual',
delay: {show: 0, hide: 1500},
placement: 'bottom',
title: 'Password copied to clipboard!'
}).tooltip('show');
window.setTimeout(function() {$('#password').tooltip('hide');}, 1500);
});
});
</script>
</body>
</html>