-
Notifications
You must be signed in to change notification settings - Fork 17
/
tools.html
403 lines (383 loc) · 22.5 KB
/
tools.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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<title>kt.gy tools</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme-3d.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.inputLabel { float:right; position:relative; margin-top:-26px; left:-8px; height:18px;
padding:2px 6px; line-height:14px; z-index:2 }
.input-sm + .inputLabel { margin-top:-24px }
#panelAscii textarea { height:34px; overflow:hidden }
#panelAscii textarea, #panelAscii input { padding-right:55px; }
.morseContent { font-weight: bold; font-size: 24px; line-height: 21px }
body { padding-top: 65px; }
input[readonly] { cursor: default !important; }
.formatSelector { }
.formatSelector .dropdown-menu { min-width: 64px; margin-top: -1px; }
.formatSelector .dropdown-menu>li>a { padding: 3px 16px; }
.formatSelector .dropdown-toggle { width: 65px; height: 100%; padding: 0 }
.formatSelector input { margin: 1px 0; }
.formatSelector .open .dropdown-menu { border-radius: 0 0 4px 4px; }
.formatSelector .open .dropdown-toggle { border-radius: 4px 0 0 0; }
.fileDropInProgress { background: red }
* { margin: 0; }
html, body { height: 100%; }
.wrapper { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -50px; }
footer, .push { height: 50px; line-height: 38px; text-align: right }
.form-control[readonly] { cursor: unset };
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance:textfield; }
#upcTable td, #upcTable th { text-align: center; }
</style>
</head>
<body>
<div id="fileDropShadow" style="display:none; position:fixed; top:0;left:0;bottom:0;right:0; background:rgba(0,0,0,0.7); z-index:9999">
<div style="border:2px dashed white; border-radius:25px; width:500px; margin-left:-250px; height:200px; margin-top:-100px; position:fixed; top:50%; left:50%; color:white; text-align:center; font-size:22px; padding-top:65px">
Drag & drop a file here<br/>to upload
</div>
</div>
<div class="wrapper">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand">kt.gy</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="tools.html">Tools</a></li>
<li><a href="blog/">Blog</a></li>
<li><a href="https://twitter.com/koczkatamas">Twitter</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<ul id="mainTabs" class="nav nav-pills" role="tablist" style="margin-bottom: 15px">
<li role="presentation" class="active"><a href="#panelAscii" id="tabAscii" role="tab" data-toggle="tab" aria-controls="panelAscii" aria-expanded="true">ASCII</a></li>
<li role="presentation" class=""><a href="#panelHash" id="tabHash" role="tab" data-toggle="tab" aria-controls="profile" aria-expanded="false">Hash</a></li>
<li role="presentation" class=""><a href="#panelRSA" id="tabRSA" role="tab" data-toggle="tab" aria-controls="profile" aria-expanded="false">RSA</a></li>
<li role="presentation" style="display:none"><a href="#panelUPC" id="tabUPC" role="tab" data-toggle="tab" aria-controls="profile" aria-expanded="false">UPC</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div role="tabpanel" class="tab-pane fade active in" id="panelAscii" aria-labelledby="tabAscii">
<div id="showButtons" class="btn-group" data-toggle="buttons" style="margin-bottom: 15px">
<label id="showGeneral" class="btn btn-default btn-sm active" data-toggle="collapse" data-target="#conversionArea"><input type="checkbox" autocomplete="off" checked>General</label>
<label id="showHash" class="btn btn-default btn-sm active" data-toggle="collapse" data-target="#hashArea"><input type="checkbox" autocomplete="off" checked>Hash</label>
<label id="showMisc" class="btn btn-default btn-sm active" data-toggle="collapse" data-target="#miscArea"><input type="checkbox" autocomplete="off" checked>Misc</label>
<label id="showRot" class="btn btn-default btn-sm" data-toggle="collapse" data-target="#rotArea"><input type="checkbox" autocomplete="off" checked>ROT</label>
<span style="float:left; margin:5px 0 0 10px">Length: <span id="dataLength">0</span> bytes (<span id="dataLengthBits">0</span> bits)</span>
</div>
<button id="btnDownload" class="btn btn-success btn3d btn-sm pull-right">Download</button>
<button id="btnUpload" class="btn btn-primary btn3d btn-sm pull-right" style="margin-right:10px">Upload</button>
<button id="btnReverse" class="btn btn-default btn3d btn-sm pull-right" style="margin-right:10px">Reverse</button>
<input type="file" id="fileInput" style="display:none"/>
<p>
<textarea id="inpAscii" placeholder="ASCII" class="form-control dataInput"></textarea>
<span class="label label-primary inputLabel">ASCII</span>
</p>
<div id="conversionArea" class="in">
<p>
<textarea id="inpDec" placeholder="Decimal" class="form-control dataInput"></textarea>
<span class="label label-info inputLabel">DEC</span>
</p>
<p>
<textarea id="inpHex" placeholder="Hex" class="form-control dataInput"></textarea>
<span class="label label-danger inputLabel">HEX</span>
</p>
<p>
<textarea id="inpOct" placeholder="Oct" class="form-control dataInput"></textarea>
<span class="label label-danger inputLabel" style="background-color:#a16946">OCT</span>
</p>
<p>
<textarea id="inpBase64" placeholder="Base64" class="form-control dataInput"></textarea>
<span class="label label-success inputLabel">B64</span>
</p>
<p>
<textarea id="inpBase64Url" placeholder="Base64-URL" class="form-control dataInput"></textarea>
<span class="label inputLabel" style="background-color:#a0b870">B64URL</span>
</p>
<p>
<textarea id="inpBase32" placeholder="Base32" class="form-control dataInput"></textarea>
<span class="label inputLabel" style="background-color:#a0d870">B32</span>
</p>
<p>
<textarea id="inpUrlEnc" placeholder="URL-encoded" class="form-control dataInput"></textarea>
<span class="label label-warning inputLabel">URL</span>
</p>
<p>
<textarea id="inpHtmlEnc" placeholder="HTML-encoded" class="form-control dataInput"></textarea>
<span class="label inputLabel" style="background-color:#f08d8e">HTML</span>
</p>
<p>
<textarea id="inpBinary" placeholder="Binary" class="form-control dataInput"></textarea>
<span class="label inputLabel" style="background-color:#563d7c;">BIN</span>
</p>
<p>
<textarea id="inpInteger" placeholder="Integer" class="form-control dataInput"></textarea>
<span class="label inputLabel" style="background-color:maroon;">INT</span>
</p>
</div>
<div id="hashArea" class="in">
<h3>Hash</h3>
<p>
<input type="text" id="md5" placeholder="MD5" class="form-control dataInput" readonly />
<span class="label label-primary inputLabel">MD5</span>
</p>
<p>
<input type="text" id="ripemd160" placeholder="RIPEMD160" class="form-control dataInput" readonly />
<span class="label label-danger inputLabel" style="background-color:#f08d8e">RIPEMD160</span>
</p>
<p>
<input type="text" id="sha1" placeholder="SHA1" class="form-control dataInput" readonly />
<span class="label label-danger inputLabel">SHA1</span>
</p>
<p>
<input type="text" id="sha256" placeholder="SHA256" class="form-control dataInput" readonly />
<span class="label label-success inputLabel">SHA256</span>
</p>
<p>
<input type="text" id="sha512" placeholder="SHA512" class="form-control dataInput" readonly />
<span class="label inputLabel" style="background-color:#563d7c;">SHA512</span>
</p>
<p>
<input type="text" id="sha3" placeholder="SHA3" class="form-control dataInput" readonly />
<span class="label label-warning inputLabel">SHA3</span>
</p>
<p>
<input type="text" id="crc32" placeholder="CRC32" class="form-control dataInput" readonly />
<span class="label inputLabel" style="background-color:maroon;">CRC32</span>
</p>
</div>
<div id="miscArea" class="in">
<h3>Misc</h3>
<p>
<textarea type="text" id="inpReverse" placeholder="Reverse" class="form-control dataInput"></textarea>
<span class="label label-warning inputLabel">REV</span>
</p>
<p>
<textarea type="text" id="inpMorse" placeholder="Morse" class="form-control dataInput"></textarea>
<span class="label label-success inputLabel">MRZ</span>
</p>
<p>
<textarea type="text" id="lUppercase" placeholder="Upper case" class="form-control dataInput" readonly></textarea>
<span class="label label-danger inputLabel">UPP</span>
</p>
<p>
<textarea type="text" id="lLowercase" placeholder="Lower case" class="form-control dataInput" readonly></textarea>
<span class="label label-primary inputLabel">LOW</span>
</p>
</div>
<div id="rotArea" class="collapse">
<h3>ROT</h3>
</div>
</div>
<div role="tabpanel" class="tab-pane fade" id="panelHash" aria-labelledby="tabHash">
<h3>
Length Extension Attack
<a href="http://en.wikipedia.org/wiki/Length_extension_attack" target="_blank" style="font-size: 13px">(more information)</a>
</h3>
<br>
<form class="form-horizontal">
<div class="form-group">
<label for="hashOrigData" class="col-sm-2 control-label">Original data</label>
<div class="col-sm-10">
<div class="input-group formatSelector">
<div class="input-group-btn">
<button type="button" class="btn btn-primary btn3d dropdown-toggle" data-toggle="dropdown">
<span class="selVal">auto</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a>auto</a></li>
<li><a>ascii</a></li>
<li><a>hex</a></li>
<li><a>b64</a></li>
<li><a>b32</a></li>
<li><a>dec</a></li>
</ul>
</div><!-- /btn-group -->
<input type="text" class="form-control" id="hashOrigData" value="">
<span class="label label-primary inputLabel">ASCII</span>
</div>
</div>
</div>
<div class="form-group">
<label for="hashOrigSign" class="col-sm-2 control-label">Original signature</label>
<div class="col-sm-10">
<div class="input-group formatSelector">
<div class="input-group-btn">
<button type="button" class="btn btn-primary btn3d dropdown-toggle" data-toggle="dropdown">
<span class="selVal">auto</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a>auto</a></li>
<li><a>ascii</a></li>
<li><a>hex</a></li>
<li><a>b64</a></li>
<li><a>b32</a></li>
<li><a>dec</a></li>
</ul>
</div><!-- /btn-group -->
<input type="text" class="form-control" id="hashOrigSign" value="">
<span class="label label-primary inputLabel">ASCII</span>
</div>
</div>
</div>
<div class="form-group">
<label for="hashSecretLen" class="col-sm-2 control-label">Secret length</label>
<div class="col-sm-2">
<input type="number" class="form-control" id="hashSecretLen" min="0" value="">
</div>
</div>
<div class="form-group">
<label for="hashAppendData" class="col-sm-2 control-label">Data to append</label>
<div class="col-sm-10">
<div class="input-group formatSelector">
<div class="input-group-btn">
<button type="button" class="btn btn-primary btn3d dropdown-toggle" data-toggle="dropdown">
<span class="selVal">auto</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a>auto</a></li>
<li><a>ascii</a></li>
<li><a>hex</a></li>
<li><a>b64</a></li>
<li><a>b32</a></li>
<li><a>dec</a></li>
</ul>
</div><!-- /btn-group -->
<input type="text" class="form-control" id="hashAppendData">
<span class="label label-primary inputLabel">ASCII</span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Detected algorithm</label>
<div class="col-sm-10">
<p id="txtHashAlgorithm" class="form-control-static" style="font-weight: bold"> </p>
</div>
</div>
<div class="form-group">
<label for="hashNewSignature" class="col-sm-2 control-label">New signature</label>
<div class="col-sm-10">
<div class="input-group formatSelector">
<div class="input-group-btn">
<button type="button" class="btn btn-primary btn3d dropdown-toggle" data-toggle="dropdown">
<span class="selVal">hex</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a>ascii</a></li>
<li><a>hex</a></li>
<li><a>b64</a></li>
<li><a>b32</a></li>
<li><a>dec</a></li>
</ul>
</div><!-- /btn-group -->
<input type="text" class="form-control" id="hashNewSignature" readonly>
</div>
</div>
</div>
<div class="form-group">
<label for="hashNewData" class="col-sm-2 control-label">New data</label>
<div class="col-sm-10">
<div class="input-group formatSelector">
<div class="input-group-btn">
<button type="button" class="btn btn-primary btn3d dropdown-toggle" data-toggle="dropdown">
<span class="selVal">hex</span> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a>ascii</a></li>
<li><a>hex</a></li>
<li><a>b64</a></li>
<li><a>b32</a></li>
<li><a>dec</a></li>
</ul>
</div><!-- /btn-group -->
<textarea class="form-control" id="hashNewData" readonly></textarea>
</div>
</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="panelRSA" aria-labelledby="tabRSA">
<p>Coming soon...</p>
</div>
<div role="tabpanel" class="tab-pane fade" id="panelUPC" aria-labelledby="tabUPC">
<div class="alert alert-warning">
<p>Javascript port of <a href="https://twitter.com/bl4sty" target="_blank">@bl4sty's</a> UPC <a href="http://haxx.in/upc_keys.c" target="_blank">WPA2 serial / passphrase predictor</a> /// <a href="js/upc.js" target="_blank">JS source code</a></p>
<p><small>(I optimised the serial generation algorithm - I hope it gives the same results.)</small></p>
</div>
<form class="form-horizontal">
<div class="form-group">
<label for="upcSsid" class="col-sm-2 control-label">SSID</label>
<div class="col-sm-10">
<div class="input-group">
<div class="input-group-addon">UPC</div>
<input type="text" class="form-control" id="upcSsid" placeholder="1234567" pattern="\d*" maxLength="7" required />
</div>
</div>
</div>
<div class="form-group">
<label for="upcPrefixes" class="col-sm-2 control-label">Serial prefix(es): </label>
<div class="col-sm-10">
<input type="text" class="form-control" id="upcPrefixes" placeholder="SAAP" value="SAAP,SBAP,SAPP" />
</div>
</div>
</form>
<div class="col-sm-5 col-md-offset-4">
<table id="upcTable" class="table table-striped table-hover table-condensed">
<thead><tr><th>Serial number</th><th>WPA2 passphrase</th></tr></thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="push"></div>
</div>
<footer class="footer">
<div class="container">
<p class="text-muted">Tamás Koczka | <a href="https://github.com/koczkatamas/koczkatamas.github.io" target="_blank">source</a></p>
</div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<script src="js/cryptojs/components/core.js"></script>
<script src="js/cryptojs/components/x64-core.js"></script>
<script src="js/cryptojs/components/md5.js"></script>
<script src="js/cryptojs/components/sha1.js"></script>
<script src="js/cryptojs/components/sha256.js"></script>
<script src="js/cryptojs/components/sha512.js"></script>
<script src="js/cryptojs/components/sha3.js"></script>
<script src="js/cryptojs/components/ripemd160.js"></script>
<script src="js/jsbn/jsbn.js"></script>
<script src="js/jsbn/jsbn2.js"></script>
<script src="js/tools.js"></script>
<script src="js/upc.js"></script>
</body>
</html>