-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
236 lines (201 loc) · 8.79 KB
/
index.html
File metadata and controls
236 lines (201 loc) · 8.79 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="./styles.css" />
<title>Password Generator</title>
</head>
<body>
<!-- Toast notification -->
<div id="toast" style="display:none; position:fixed; top:20px; right:20px; background:#4f46e5; color:white; padding:12px 20px; border-radius:4px; z-index:1000; box-shadow:0 4px 6px rgba(0,0,0,0.1);">
Share link copied!
</div>
<div class="container">
<!-- TABS -->
<div class="tabs">
<div class="tab active" data-tab="passwordTab">Password</div>
<div class="tab" data-tab="userIdTab">User ID</div>
</div>
<!-- PASSWORD TAB -->
<div id="passwordTab" class="tab-content active">
<h2>Password Generator</h2>
<label>Mode:
<select id="passwordMode">
<option value="strong">Strong (custom sets)</option>
<option value="easyWrite">Easy to write</option>
<option value="easySay">Easy to say</option>
<option value="passphrase">Passphrase (Diceware)</option>
<option value="icloud">iCloud-style</option>
</select>
</label>
<div id="strongModeControls">
<label>Password Length:
<input type="number" id="length" min="4" max="64" value="12" />
</label>
<div id="lengthError" class="error"></div>
<label><input type="checkbox" id="lowercase" checked /> Lowercase</label>
<label><input type="checkbox" id="uppercase" checked /> Uppercase</label>
<label><input type="checkbox" id="digits" checked /> Digits</label>
<label><input type="checkbox" id="symbols" /> Symbols</label>
<label>Custom Symbols:
<input type="text" id="customSymbols" placeholder="!@#$%^&*" />
</label>
<div id="symbolError" class="error"></div>
</div>
<div id="easyWriteModeControls" style="display:none;">
<label>Password Length:
<input type="number" id="easyWriteLength" min="8" max="64" value="16" />
</label>
<div class="info" style="font-size:0.9em; margin-top:4px;">
Uses unambiguous characters only (removed: O, 0, I, l, 1, S, 5, B, 8)
</div>
</div>
<div id="easySayModeControls" style="display:none;">
<label>Syllables:
<select id="easySaySyllables">
<option value="4">4 (12 letters)</option>
<option value="5" selected>5 (15 letters)</option>
<option value="6">6 (18 letters)</option>
</select>
</label>
<label><input type="checkbox" id="easySayAddDigit" checked /> Add one digit at end</label>
<div class="info" style="font-size:0.9em; margin-top:4px;">
Generates pronounceable CVC syllables (consonant-vowel-consonant)
</div>
</div>
<div id="passphraseModeControls" style="display:none;">
<label>Word count:
<select id="passphraseWordCount">
<option value="4">4 words</option>
<option value="5">5 words</option>
<option value="6" selected>6 words</option>
<option value="7">7 words</option>
<option value="8">8 words</option>
</select>
</label>
<label>Separator:
<select id="passphraseSeparator">
<option value=" " selected>space</option>
<option value="-">-</option>
<option value="_">_</option>
</select>
</label>
<label><input type="checkbox" id="passphraseCapitalize" /> Capitalize one random word</label>
<label><input type="checkbox" id="passphraseAddDigits" /> Add digits at the end</label>
<div class="info" style="font-size:0.9em; margin-top:4px;">
Uses EFF long wordlist for Diceware-style passphrases. Each word is chosen uniformly at random.
</div>
</div>
<button type="button" id="generate">Generate</button>
<button type="button" id="share">Share</button>
<button type="button" id="resetPasswordSettings" class="btn-secondary">Reset Settings</button>
<input type="text" id="password" readonly />
<button type="button" id="copy">Copy</button>
<div id="copyError" class="error"></div>
<div id="strengthLabel"></div>
<div id="strengthBar"></div>
<!-- CRACK TIME BLOCK -->
<div id="crackTimeContainer" class="crack-time" style="display:none; margin-top:12px;">
<div style="margin-bottom:8px;">
<strong>Estimated crack time (offline, fast hash):</strong>
</div>
<div style="margin-bottom:8px;">
<label style="display:inline-block; margin-right:8px;">Hardware:</label>
<select id="crackHardware" style="display:inline-block; width:auto; padding:4px 8px;">
<option value="cpu">High-end CPU (1×10⁹ guesses/sec) — Modern multi-core CPU</option>
<option value="rtx4090">RTX 4090 (single GPU) (5×10¹¹ guesses/sec) — Fast hash, real-world order of magnitude</option>
<option value="rig8x4090">8× RTX 4090 rig (4×10¹² guesses/sec) — Small cracking rig</option>
<option value="datacenter">Datacenter attacker (1×10¹⁴ guesses/sec) — Large-scale / nation-state level</option>
</select>
</div>
<div id="crackTimeValue" style="margin-bottom:8px; font-weight:bold; font-size:1.1em;"></div>
<div id="crackTimeWarning" class="error" style="margin-bottom:8px; display:none;"></div>
<div id="crackTimeDisclaimer" class="note" style="font-size:0.85em; color:#666; margin-top:8px;">
Assumes attacker has the password hash and can guess offline using fast hashing algorithms.<br>
Slow password hashing (bcrypt / Argon2id) can increase attack time by orders of magnitude.
</div>
</div>
</div>
<!-- USER ID TAB -->
<div id="userIdTab" class="tab-content">
<h2>User ID Generator</h2>
<!-- MODE SELECTOR -->
<label>
Mode:
<select id="uidMode">
<option value="cvc">CVC (pronounceable)</option>
<option value="words">Words (adjective + noun)</option>
</select>
</label>
<!-- CVC MODE CONTROLS -->
<div id="uidCvcControls" class="uid-cvc-controls visible">
<label>Syllables:
<select id="uidSyllables">
<option value="2">2</option>
<option value="3">3</option>
</select>
</label>
<label><input type="checkbox" id="uidAddDigits" checked /> Add digits</label>
<label>Digit count:
<select id="uidDigitsCount">
<option value="2">2</option>
<option value="3">3</option>
</select>
</label>
<label><input type="checkbox" id="uidAddSuffix" checked /> Add suffix</label>
<label>Suffix:
<input type="text" id="uidSuffix" value="dev" />
</label>
<label>Max length:
<input type="number" id="uidMaxLength" min="6" max="24" value="15" />
</label>
</div>
<!-- WORDS MODE CONTROLS -->
<div id="uidWordsControls" class="uid-words-controls">
<label>Words count:
<select id="uidWordsCount">
<option value="2">2 (adj + noun)</option>
<option value="3">3 (adj + adj + noun)</option>
</select>
</label>
<label>Separator:
<select id="uidWordsSeparator">
<option value="_">_</option>
<option value=".">.</option>
<option value="-">-</option>
<option value="none">none</option>
</select>
</label>
<label><input type="checkbox" id="uidWordsAddDigits" /> Add digits</label>
<label>Digits count:
<select id="uidWordsDigitsCount">
<option value="2">2</option>
<option value="3">3</option>
</select>
</label>
<label>Max length:
<input type="number" id="uidWordsMaxLength" min="8" max="30" value="20" />
</label>
</div>
<!-- SHARED -->
<label>Generate count:
<select id="uidCount">
<option value="5">5</option>
<option value="10" selected>10</option>
<option value="20">20</option>
</select>
</label>
<div id="uidError" class="error"></div>
<button type="button" id="uidGenerateBtn">Generate</button>
<button type="button" id="uidShare">Share</button>
<button type="button" id="resetUserIdSettings" class="btn-secondary">Reset Settings</button>
<div id="uidResults"></div>
</div>
</div>
<script type="module" src="./script.js"></script>
</body>
</html>