git ssb

0+

dangerousbeans / vanity-feed-id



Commit 95bb9a6860cffaf97428b81d6600e7b668345654

intial commit

Joran committed on 6/20/2018, 5:17:08 AM

Files changed

.gitignoreadded
main.jsadded
package-lock.jsonadded
package.jsonadded
.gitignoreView
@@ -1,0 +1,1 @@
1 +node_modules/
main.jsView
@@ -1,0 +1,37 @@
1 +var ssbKeys = require('ssb-keys')
2 +var checkWord = require('check-word'),
3 + words = checkWord('en');
4 +
5 +
6 +while(true)
7 +{
8 + // get candidate keys
9 + var key = ssbKeys.generate()
10 + var pub_key = key.public
11 +
12 + // split into 4..7 word chunks
13 + var possible_words = []
14 + var min_size = 5
15 + var max_size = 7
16 +
17 + for(i = min_size; i <= max_size; i++)
18 + {
19 + possible_words.push(pub_key.substring( 0, i ))
20 + }
21 +
22 + for(var word of possible_words) {
23 + // check if only letters (+++ SPEED)
24 + if( is_letters(word) )
25 + {
26 + // check if in dictionary
27 + if(words.check(word))
28 + console.log(key)
29 + }
30 + }
31 +}
32 +
33 +
34 +function is_letters(str)
35 +{
36 + return /^[a-zA-Z]+$/.test(str)
37 +}
package-lock.jsonView
@@ -1,0 +1,194 @@
1 +{
2 + "name": "ssb-vanity-feed-id-maker",
3 + "version": "1.0.0",
4 + "lockfileVersion": 1,
5 + "requires": true,
6 + "dependencies": {
7 + "check-word": {
8 + "version": "1.1.0",
9 + "resolved": "https://registry.npmjs.org/check-word/-/check-word-1.1.0.tgz",
10 + "integrity": "sha1-StXBFButGXTOR/0RdvnUNpAXxHU="
11 + },
12 + "chloride": {
13 + "version": "2.2.10",
14 + "resolved": "https://registry.npmjs.org/chloride/-/chloride-2.2.10.tgz",
15 + "integrity": "sha512-CbU1ISGiB2JBV6PDXx7hkl8D94d2TPD1BANUMFbr8rZYKJi8De2d3Hu2XDIOLAhXf+8yhoFOdjtLG6fxz3QByQ==",
16 + "requires": {
17 + "is-electron": "^2.0.0",
18 + "sodium-browserify": "^1.2.4",
19 + "sodium-browserify-tweetnacl": "^0.2.2",
20 + "sodium-chloride": "^1.1.0",
21 + "sodium-native": "^2.1.6"
22 + }
23 + },
24 + "chloride-test": {
25 + "version": "1.2.2",
26 + "resolved": "https://registry.npmjs.org/chloride-test/-/chloride-test-1.2.2.tgz",
27 + "integrity": "sha1-F4aGqF6SeARREulujHkXk/mhCuo=",
28 + "requires": {
29 + "json-buffer": "^2.0.11"
30 + }
31 + },
32 + "ed2curve": {
33 + "version": "0.1.4",
34 + "resolved": "https://registry.npmjs.org/ed2curve/-/ed2curve-0.1.4.tgz",
35 + "integrity": "sha1-lKRCSLuH2jXbDv968KpXYWgRf1k=",
36 + "requires": {
37 + "tweetnacl": "0.x.x"
38 + }
39 + },
40 + "inherits": {
41 + "version": "2.0.3",
42 + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
43 + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
44 + },
45 + "ini": {
46 + "version": "1.3.5",
47 + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
48 + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
49 + "optional": true
50 + },
51 + "is-electron": {
52 + "version": "2.1.0",
53 + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.1.0.tgz",
54 + "integrity": "sha512-dkg5xT383+M6zIbbXW/z7n2nz4SFUi2OSyhntnFYkRdtV+HVEfdjEK+5AWisfYgkpe3WYjTIuh7toaKmSfFVWw=="
55 + },
56 + "json-buffer": {
57 + "version": "2.0.11",
58 + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-2.0.11.tgz",
59 + "integrity": "sha1-PkQf2jCYvo0eMXGtWRvGKjPi1V8="
60 + },
61 + "libsodium": {
62 + "version": "0.7.3",
63 + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.3.tgz",
64 + "integrity": "sha512-ld+deUNqSsZYbAobUs63UyduPq8ICp/Ul/5lbvBIYpuSNWpPRU0PIxbW+xXipVZtuopR6fIz9e0tTnNuPMNeqw=="
65 + },
66 + "libsodium-wrappers": {
67 + "version": "0.7.3",
68 + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.3.tgz",
69 + "integrity": "sha512-dw5Jh6TZ5qc5rQVZe3JrSO/J05CE+DmAPnqD7Q2glBUE969xZ6o3fchnUxyPlp6ss3x0MFxmdJntveFN+XTg1g==",
70 + "requires": {
71 + "libsodium": "0.7.3"
72 + }
73 + },
74 + "minimist": {
75 + "version": "0.0.8",
76 + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
77 + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
78 + },
79 + "mkdirp": {
80 + "version": "0.5.1",
81 + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
82 + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
83 + "requires": {
84 + "minimist": "0.0.8"
85 + }
86 + },
87 + "nan": {
88 + "version": "2.10.0",
89 + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
90 + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
91 + "optional": true
92 + },
93 + "node-gyp-build": {
94 + "version": "3.3.0",
95 + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.3.0.tgz",
96 + "integrity": "sha512-SNtBzznpPggc7mY8XTfnYBywd9OGN99bwnxGKFqud9erYJMbwnJn6B8HXER2dy8iOYr6Nf2SzBQoJjV8gdM4Nw==",
97 + "optional": true
98 + },
99 + "private-box": {
100 + "version": "0.2.1",
101 + "resolved": "https://registry.npmjs.org/private-box/-/private-box-0.2.1.tgz",
102 + "integrity": "sha1-HfBhr8pbMDnH/qrdDa8PVvB+PsA=",
103 + "requires": {
104 + "chloride": "^2.2.1"
105 + }
106 + },
107 + "safe-buffer": {
108 + "version": "5.1.2",
109 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
110 + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
111 + },
112 + "sha.js": {
113 + "version": "2.4.5",
114 + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.5.tgz",
115 + "integrity": "sha1-J9Fx78yCoRi5ljn/WBZgJCtQbnw=",
116 + "requires": {
117 + "inherits": "^2.0.1"
118 + }
119 + },
120 + "sodium-browserify": {
121 + "version": "1.2.4",
122 + "resolved": "https://registry.npmjs.org/sodium-browserify/-/sodium-browserify-1.2.4.tgz",
123 + "integrity": "sha512-IYcxKje/uf/c3a7VhZYJLlUxWMcktfbD4AjqHjUD1/VWKjj0Oq5wNbX8wjJOWVO9UhUMqJQiOn2xFbzKWBmy5w==",
124 + "requires": {
125 + "libsodium-wrappers": "^0.7.3",
126 + "sha.js": "2.4.5",
127 + "sodium-browserify-tweetnacl": "^0.2.3",
128 + "tweetnacl": "^0.14.1"
129 + }
130 + },
131 + "sodium-browserify-tweetnacl": {
132 + "version": "0.2.3",
133 + "resolved": "https://registry.npmjs.org/sodium-browserify-tweetnacl/-/sodium-browserify-tweetnacl-0.2.3.tgz",
134 + "integrity": "sha1-tVN//LufdOvEQ7i2ohGykej8vI4=",
135 + "requires": {
136 + "chloride-test": "^1.1.0",
137 + "ed2curve": "^0.1.4",
138 + "sha.js": "^2.4.8",
139 + "tweetnacl": "^0.14.1",
140 + "tweetnacl-auth": "^0.3.0"
141 + },
142 + "dependencies": {
143 + "sha.js": {
144 + "version": "2.4.11",
145 + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
146 + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
147 + "requires": {
148 + "inherits": "^2.0.1",
149 + "safe-buffer": "^5.0.1"
150 + }
151 + }
152 + }
153 + },
154 + "sodium-chloride": {
155 + "version": "1.1.0",
156 + "resolved": "https://registry.npmjs.org/sodium-chloride/-/sodium-chloride-1.1.0.tgz",
157 + "integrity": "sha1-JHojS4iGf23/UTMrYF8ZOmW/aDk="
158 + },
159 + "sodium-native": {
160 + "version": "2.1.6",
161 + "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-2.1.6.tgz",
162 + "integrity": "sha512-vfovcNlU8C93SbeNoGSAdW5zVOTlrh1sTy+TzdC2FhDTE/IUK6j4ML5gdr/qziLz4XRT4EQWJvbFzql6CAAH/A==",
163 + "optional": true,
164 + "requires": {
165 + "ini": "^1.3.5",
166 + "nan": "^2.4.0",
167 + "node-gyp-build": "^3.0.0"
168 + }
169 + },
170 + "ssb-keys": {
171 + "version": "7.0.16",
172 + "resolved": "https://registry.npmjs.org/ssb-keys/-/ssb-keys-7.0.16.tgz",
173 + "integrity": "sha512-EhLkRzgF7YaRc47L8YZb+TcxEXZy9DPWCF+vCt5nSNm8Oj+Pz8pBVSOlrLKZVbcAKFjIJhqY32oTjknu3E1KVQ==",
174 + "requires": {
175 + "chloride": "^2.2.8",
176 + "mkdirp": "~0.5.0",
177 + "private-box": "^0.2.1"
178 + }
179 + },
180 + "tweetnacl": {
181 + "version": "0.14.5",
182 + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
183 + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
184 + },
185 + "tweetnacl-auth": {
186 + "version": "0.3.1",
187 + "resolved": "https://registry.npmjs.org/tweetnacl-auth/-/tweetnacl-auth-0.3.1.tgz",
188 + "integrity": "sha1-t1vC3xVkm7hOi5qjwGacbEvODSU=",
189 + "requires": {
190 + "tweetnacl": "0.x.x"
191 + }
192 + }
193 + }
194 +}
package.jsonView
@@ -1,0 +1,15 @@
1 +{
2 + "name": "ssb-vanity-feed-id-maker",
3 + "version": "1.0.0",
4 + "description": "Create a vanity feedid for the secure scuttlebutt p2p web, like @potatoAsuyfd57%&^FD%AS66AS=.ed25519",
5 + "main": "main.js",
6 + "scripts": {
7 + "test": "echo \"Error: no test specified\" && exit 1"
8 + },
9 + "author": "Joran Kikke (@donkeyscience)",
10 + "license": "ISC",
11 + "dependencies": {
12 + "check-word": "^1.1.0",
13 + "ssb-keys": "^7.0.16"
14 + }
15 +}

Built with git-ssb-web