-
Notifications
You must be signed in to change notification settings - Fork 20
/
secrets.js
48 lines (33 loc) · 1.56 KB
/
secrets.js
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
'use strict';
var combinations = require('./combinations');
module.exports = (function() {
var secrets = [],
prefixedSecrets = [],
suffixedSecrets = [],
paddedSecrets = [],
passwords = [
'insecure',
'secret',
],
letters = ['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'],
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
dividers = ['|', '&', '+', '-', '_', ' ', ''];
secrets = passwords;
secrets = secrets.concat(combinations(passwords, '!!'));
secrets = secrets.concat(combinations(dividers, passwords[0] + '!' + passwords[1]));
secrets = secrets.concat(combinations(dividers, passwords[1] + '!' + passwords[0]));
secrets.forEach(function(secret) {
prefixedSecrets = prefixedSecrets.concat(combinations(letters, '!!-' + secret));
prefixedSecrets = prefixedSecrets.concat(combinations(numbers, '!' + secret));
prefixedSecrets = prefixedSecrets.concat(combinations(numbers, '!-' + secret));
prefixedSecrets = prefixedSecrets.concat(combinations(numbers, '0!-' + secret));
});
secrets.forEach(function(secret) {
suffixedSecrets = suffixedSecrets.concat(combinations(numbers, secret + '-!'));
suffixedSecrets = suffixedSecrets.concat(combinations(numbers, secret + '-0!'));
});
secrets = secrets.concat(prefixedSecrets);
secrets = secrets.concat(suffixedSecrets);
return secrets;
}());