-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPassGen.tsk.xml
More file actions
245 lines (227 loc) · 9.93 KB
/
PassGen.tsk.xml
File metadata and controls
245 lines (227 loc) · 9.93 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
237
238
239
240
241
242
243
244
245
<TaskerData sr="" dvi="1" tv="4.8u4m">
<Task sr="task16">
<cdate>1465590166218</cdate>
<edate>1466179025304</edate>
<id>16</id>
<nme>PassGen - 0.0.1</nme>
<pri>100</pri>
<Action sr="act0" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%salt</Str>
<Str sr="arg1" ve="3">PUT YOUR SALT HERE</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act1" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%length</Str>
<Str sr="arg1" ve="3">40</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act2" ve="7">
<code>129</code>
<Str sr="arg0" ve="3">'use strict';
var skein=(function(){var p,q,u,v,w,z,A,B,C,D,E,L;L=function(a,b){this.lo=a?a:0;this.hi=b?b:0};L.clone=function(a){return new L(a.lo,a.hi)};L.prototype={xor:function(a){this.lo^=a.lo;this.hi^=a.hi;return this},plus:(function(){var b,s;b=4*(1<<30);s=function(x,y){var t=x+y;if(x<0){t+=b}if(y<0){t+=b}return t};return function(a){this.lo=s(this.lo,a.lo);this.hi=(s(this.hi,a.hi)+(this.lo>=b?1:0))%b;this.lo=this.lo%b;return this}}()),circ:function(n){var a,m;if(n>=32){a=this.lo;this.lo=this.hi;this.hi=a;n-=32}m=32-n;a=(this.hi<<n)+(this.lo>>>m);this.lo=(this.lo<<n)+(this.hi>>>m);this.hi=a;return this},toString:(function(){var a,o;a=function(n){return("00"+n.toString(16)).slice(-2)};o=function(n){return a(n&255)+a(n>>>8)+a(n>>>16)+a(n>>>24)};return function(){return o(this.lo)+o(this.hi)}}())};p=[0,2,4,6,2,4,6,0,4,6,0,2,6,0,2,4];q=[1,3,5,7,1,7,5,3,1,3,5,7,1,7,5,3];u=String.fromCharCode;v=u(0);w=v+v+v+v;w+=w+w+w;w+=w;z=[[46,36,19,37,33,27,14,42,17,49,36,39,44,9,54,56],[39,30,34,24,13,50,10,17,25,29,39,43,8,35,56,22]];E=function(a,b,c){for(var i=0;i<8;i+=1){C[i].plus(a[(c+i)%9])}C[5].plus(b[c%3]);C[6].plus(b[(c+1)%3]);C[7].plus(new L(c))};D=function(r){var a,b,i;for(i=0;i<16;i+=1){a=p[i];b=q[i];C[a].plus(C[b]);C[b].circ(r[i]).xor(C[a])}};A=function(a,b){var c,d,i,j,e,f,g,h,k,l;l=b.length;if(l%32){b+=w.slice(l%32)}else if(l===0){b=w}d=[];j=0;for(i=0;i<b.length;i+=4){d[j]=new L(b.charCodeAt(i)+b.charCodeAt(i+1)*0x10000,b.charCodeAt(i+2)+b.charCodeAt(i+3)*0x10000);j+=1}g=1<<30;a<<=24;h=d.length-8;for(e=0;e<=h;e+=8){k=(e===h)?[new L(2*l),new L(0,g+a+(1<<31))]:[new L(8*e+64),new L(0,g+a)];k[2]=new L().xor(k[0]).xor(k[1]);c=C;c[8]=new L(0xa9fc1a22,0x1bd11bda);for(i=0;i<8;i+=1){c[8].xor(c[i])}C=d.slice(e,e+8).map(L.clone);for(f=0;f<18;f+=1){E(c,k,f);D(z[f%2])}E(c,k,f);for(i=0;i<8;i+=1){C[i].xor(d[e+i])}g=0}};C=[new L(),new L(),new L(),new L(),new L(),new L(),new L(),new L()];A(4,u(0x4853,0x3341,1,0,512)+w.slice(5,16));B=C;return function(m){C=B.map(L.clone);A(48,m);A(63,v+v+v+v);return C.join("")}}());
(function() {
var hasNode = (typeof process !== 'undefined' && process.versions && process.versions.node),
hasTypedArray = (typeof Uint8Array !== 'undefined');
if (hasNode && require('fs').existsSync(__dirname + '/../build/Release/base91encdec.node')) {
module.exports = require(__dirname + '/../build/Release/base91encdec.node');
return;
}
var AVERAGE_ENCODING_RATIO = 1.2297,
ENCODING_TABLE = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'!', '#', '$', '%', '&', '(', ')', '*', '+', ',', '.', '/', ':', ';',
'<', '=', '>', '?', '@', '[', ']', '^', '_', '`', '{', '|', '}', '~',
'"'
],
DECODING_TABLE = [
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 62, 90, 63, 64, 65, 66, 91, 67, 68, 69, 70, 71, 91, 72, 73,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 74, 75, 76, 77, 78, 79,
80, 0, 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, 81, 91, 82, 83, 84,
85, 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, 86, 87, 88, 89, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91
];
var i = 0;
var base91 = {
encode: function(data) {
var len = data.length,
output = '', ebq = 0, en = 0, ev = 0, j = 0, byte = 0;
if (typeof data === 'string') {
for (i = 0; i < len; ++i) {
byte = data.charCodeAt(i);
j = 0;
var lenj = (byte < 128
? 1
: (byte > 127 && byte < 2048
? 2
: 3));
for (; j < lenj; ++j) {
if (lenj === 1)
ebq |= byte << en;
else if (lenj === 2) {
if (j === 0)
ebq |= ((byte >> 6) | 192) << en;
else
ebq |= ((byte & 63) | 128) << en;
} else {
if (j === 0)
ebq |= ((byte >> 12) | 224) << en;
else if (j === 1)
ebq |= (((byte >> 6) & 63) | 128) << en;
else
ebq |= ((byte & 63) | 128) << en;
}
en += 8;
if (en > 13) {
ev = ebq & 8191;
if (ev > 88) {
ebq >>= 13;
en -= 13;
} else {
ev = ebq & 16383;
ebq >>= 14;
en -= 14;
}
output += ENCODING_TABLE[ev % 91];
output += ENCODING_TABLE[(ev / 91) | 0];
}
}
}
} else {
for (i = 0; i < len; ++i) {
ebq |= (data[i] & 255) << en;
en += 8;
if (en > 13) {
ev = ebq & 8191;
if (ev > 88) {
ebq >>= 13;
en -= 13;
} else {
ev = ebq & 16383;
ebq >>= 14;
en -= 14;
}
output += ENCODING_TABLE[ev % 91];
output += ENCODING_TABLE[(ev / 91) | 0];
}
}
}
if (en > 0) {
output += ENCODING_TABLE[ebq % 91];
if (en > 7 || ebq > 90)
output += ENCODING_TABLE[(ebq / 91) | 0];
}
return output;
},
decode: function(data) {
var len = data.length,
estimatedSize = ((len / AVERAGE_ENCODING_RATIO) | 0),
dbq = 0, dn = 0, dv = -1, i = 0, o = -1, byte = 0,
output = new Array(estimatedSize);
if (typeof data === 'string') {
for (i = 0; i < len; ++i) {
byte = data.charCodeAt(i);
if (DECODING_TABLE[byte] === 91)
continue;
if (dv === -1)
dv = DECODING_TABLE[byte];
else {
dv += DECODING_TABLE[byte] * 91;
dbq |= dv << dn;
dn += ((dv & 8191) > 88 ? 13 : 14);
do {
if (++o >= estimatedSize)
output.push(dbq & 0xFF);
else
output[o] = dbq & 0xFF;
dbq >>= 8;
dn -= 8;
} while (dn > 7);
dv = -1;
}
}
} else {
for (i = 0; i < len; ++i) {
byte = data[i];
if (DECODING_TABLE[byte] === 91)
continue;
if (dv === -1)
dv = DECODING_TABLE[byte];
else {
dv += DECODING_TABLE[byte] * 91;
dbq |= dv << dn;
dn += ((dv & 8191) > 88 ? 13 : 14);
do {
if (++o >= estimatedSize)
output.push(dbq & 0xFF);
else
output[o] = dbq & 0xFF;
dbq >>= 8;
dn -= 8;
} while (dn > 7);
dv = -1;
}
}
}
if (dv !== -1) {
if (++o >= estimatedSize)
output.push(dbq | dv << dn);
else
output[o] = (dbq | dv << dn);
}
if (o > -1 && o < estimatedSize - 1)
output = output.slice(0, o + 1);
var ret;
if (hasNode)
ret = new Buffer(output);
else if (hasTypedArray) {
ret = new Uint8Array(output.length);
for (i = 0, len = output.length; i < len; ++i)
ret[i] = output[i];
} else
ret = output;
return ret;
}
};
if (hasNode)
module.exports = base91;
else
window.base91 = base91;
})();
var sitestring = window.prompt('What string can you remember for this site?', '');
var hash = skein(sitestring.trim() + local('salt'));
var start = HexToInt(hash.substring(0,1)) + HexToInt(hash.substring(1,2)) + HexToInt(hash.substring(2,3));
var end = start + parseInt(local('length'));
var hashOut = base91.encode(hash).substring(start, end);
setClip(hashOut, false);
flash('Password copied to clipboard');
function HexToInt(hexString) {
return parseInt(hexString, 16);
}</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="45"/>
</Action>
<Img sr="icn" ve="2">
<nme>hl_device_access_accounts</nme>
</Img>
</Task>
</TaskerData>