|
179 | 179 |
|
180 | 180 | if args.populate or args.keywords:
|
181 | 181 | print 'Populating Keywords...'
|
182 |
| - sql = "INSERT INTO " + DB.keyword._table + """(keyword, parent) |
183 |
| - |
184 |
| - SELECT 'project-libgcrypt', 'crypto-library' UNION |
185 |
| -
|
186 |
| - SELECT 'project-schleuder', 'mailinglist' UNION |
187 |
| - SELECT 'project-sels', 'mailinglist' UNION |
188 |
| - SELECT 'project-secure-list-server', 'mailinglist' UNION |
189 |
| - SELECT 'project-mmreencrypt', 'mailinglist' UNION |
190 |
| - SELECT 'project-shibboleth', 'mailinglist' UNION |
191 |
| - SELECT 'project-crypt-ml', 'mailinglist' UNION |
192 |
| - |
193 |
| - SELECT 'project-onak', 'keyserver' UNION |
194 |
| - |
195 |
| - SELECT 'project-gnupg', 'filecrypto' UNION |
196 |
| - |
197 |
| - SELECT 'project-aam2mail', 'remailer' UNION |
198 |
| - SELECT 'project-nymserv', 'remailer' UNION |
199 |
| - SELECT 'pynchon', 'remailer' UNION |
200 |
| - SELECT 'project-pynchon', 'remailer' UNION |
201 |
| - SELECT 'underhill', 'remailer' UNION |
202 |
| - SELECT 'mixminion', 'remailer' UNION |
203 |
| - SELECT 'project-mixminion', 'remailer' UNION |
204 |
| - SELECT 'mixmaster', 'remailer' UNION |
205 |
| - SELECT 'project-mixmaster', 'remailer' UNION |
206 |
| - |
207 |
| - SELECT 'project-encfs', 'fde' UNION |
208 |
| - SELECT 'project-luks', 'fde' UNION |
209 |
| - |
210 |
| - SELECT 'project-cr-gpg', 'browser-plugin' UNION |
211 |
| - SELECT 'project-https-everywhere', 'browser-plugin' UNION |
212 |
| - |
213 |
| - SELECT 'project-enigmail', 'mailcient-plugin' UNION |
214 |
| - |
215 |
| - SELECT 'project-cr-gpg', 'email-crypto' UNION |
216 |
| - SELECT 'project-enigmail', 'email-crypto' UNION |
217 |
| - SELECT 'penango', 'email-crypto' UNION |
218 |
| - SELECT 'smime', 'email-crypto' UNION |
219 |
| - |
220 |
| - SELECT 'project-tor-debian-polipo', 'debian' UNION |
221 |
| - SELECT 'project-tor-debian-tor', 'debian' UNION |
222 |
| -
|
223 |
| - SELECT 'debian', NULL UNION |
224 |
| - SELECT 'gentoo', NULL UNION |
225 |
| - SELECT 'ubuntu', NULL UNION |
226 |
| - SELECT 'osx', NULL UNION |
227 |
| - SELECT 'ppc', NULL UNION |
228 |
| - SELECT 'slackware', NULL UNION |
229 |
| - SELECT 'fedora', NULL UNION |
230 |
| - SELECT 'red hat', NULL UNION |
231 |
| - SELECT 'rhel', NULL UNION |
232 |
| - SELECT 'suse', NULL UNION |
233 |
| -
|
234 |
| - SELECT 'pthread', NULL UNION |
235 |
| - SELECT 'ctypes', NULL UNION |
236 |
| -
|
237 |
| - SELECT 'valgrind', NULL UNION |
238 |
| - SELECT 'oprofile', NULL UNION |
239 |
| -
|
240 |
| - SELECT 'design doc', 'designdoc' UNION |
241 |
| -
|
242 |
| - SELECT 'maildir', NULL UNION |
243 |
| - |
244 |
| - SELECT 'oaep', 'crypto-padding' UNION |
245 |
| - SELECT 'oaep', 'RSA' UNION |
246 |
| -
|
247 |
| - SELECT 'RSA', 'asymmetric-crypto' UNION |
248 |
| - SELECT 'elgamal', 'asymmetric-crypto' UNION |
249 |
| - SELECT 'ntru', 'asymmetric-crypto' UNION |
250 |
| - SELECT 'curve25519', 'asymmetric-crypto' UNION |
251 |
| - |
252 |
| - SELECT 'curve25519', 'eliptic-curve-crypto' UNION |
253 |
| - SELECT 'ecdh', 'eliptic-curve-crypto' UNION |
254 |
| - SELECT 'ecdsa', 'eliptic-curve-crypto' UNION |
255 |
| - |
256 |
| - SELECT 'stream-cipher', 'symmetric-crypto' UNION |
257 |
| - SELECT 'block-cipher', 'symmetric-crypto' UNION |
258 |
| -
|
259 |
| - SELECT 'aes', 'block-cipher' UNION |
260 |
| - SELECT 'blowfish', 'block-cipher' UNION |
261 |
| - SELECT 'des', 'block-cipher' UNION |
262 |
| - SELECT '3des', 'block-cipher' UNION |
263 |
| - SELECT 'serpent', 'block-cipher' UNION |
264 |
| - SELECT 'twofish', 'block-cipher' UNION |
265 |
| - SELECT 'camellia', 'block-cipher' UNION |
266 |
| - SELECT 'cast-128', 'block-cipher' UNION |
267 |
| - SELECT 'rc4', 'stream-cipher' UNION |
268 |
| - SELECT 'salsa', 'stream-cipher' UNION |
269 |
| - SELECT 'idea', 'block-cipher' UNION |
270 |
| - SELECT 'tea', 'block-cipher' UNION |
271 |
| - SELECT 'xtea', 'block-cipher' UNION |
272 |
| - SELECT 'cast-256', 'block-cipher' UNION |
273 |
| - SELECT 'gost', 'block-cipher' UNION |
274 |
| - SELECT 'kasumi', 'block-cipher' UNION |
275 |
| - SELECT 'threefish', 'block-cipher' UNION |
276 |
| - SELECT 'a5/1', 'stream-cipher' UNION |
277 |
| - SELECT 'a5/2', 'stream-cipher' UNION |
278 |
| - SELECT 'rijndael', 'aes' UNION |
279 |
| - SELECT 'cast5', 'block-cipher' UNION |
280 |
| - |
281 |
| - SELECT 'ECB', 'crypto-mode-of-operation' UNION |
282 |
| - SELECT 'CBC', 'crypto-mode-of-operation' UNION |
283 |
| - SELECT 'PCBC', 'crypto-mode-of-operation' UNION |
284 |
| - SELECT 'CFB', 'crypto-mode-of-operation' UNION |
285 |
| - SELECT 'OFB', 'crypto-mode-of-operation' UNION |
286 |
| - SELECT 'CTR', 'crypto-mode-of-operation' UNION |
287 |
| - SELECT 'CCM', 'crypto-mode-of-operation' UNION |
288 |
| - SELECT 'GCM', 'crypto-mode-of-operation' UNION |
289 |
| - SELECT 'CMAC', 'crypto-mode-of-operation' UNION |
290 |
| - SELECT 'CBC-MAC', 'crypto-mode-of-operation' UNION |
291 |
| - SELECT 'OMAC', 'crypto-mode-of-operation' UNION |
292 |
| - SELECT 'crypto-mode-of-operation', 'block-cipher' UNION |
293 |
| - |
294 |
| - |
295 |
| - SELECT 'tlsv1', 'tls' UNION |
296 |
| - SELECT 'tls1', 'tls' UNION |
297 |
| - SELECT 'tlsv1.1', 'tls' UNION |
298 |
| - SELECT 'tls1.1', 'tls' UNION |
299 |
| - SELECT 'tlsv1.2', 'tls' UNION |
300 |
| - SELECT 'tls1.2', 'tls' UNION |
301 |
| - SELECT 'sslv3', 'ssl' UNION |
302 |
| - SELECT 'ssl3', 'ssl' UNION |
303 |
| - SELECT 'sslv2', 'ssl' UNION |
304 |
| - SELECT 'ssl2', 'ssl' UNION |
305 |
| - SELECT 'tls', 'ssl' UNION |
306 |
| - SELECT 'ssl', 'tls' UNION |
307 |
| - SELECT 'BEAST', 'ssl' UNION |
308 |
| - |
309 |
| - SELECT 'hmac', NULL UNION |
310 |
| -
|
311 |
| - SELECT 'dkim', NULL UNION |
312 | 182 |
|
313 |
| - SELECT 'md2', 'hash-functions' UNION |
314 |
| - SELECT 'md4', 'hash-functions' UNION |
315 |
| - SELECT 'md5', 'hash-functions' UNION |
316 |
| - SELECT 'sha224', 'hash-functions' UNION |
317 |
| - SELECT 'sha256', 'hash-functions' UNION |
318 |
| - SELECT 'sha384', 'hash-functions' UNION |
319 |
| - SELECT 'sha512', 'hash-functions' UNION |
320 |
| - SELECT 'sha-224', 'hash-functions' UNION |
321 |
| - SELECT 'sha-256', 'hash-functions' UNION |
322 |
| - SELECT 'sha-384', 'hash-functions' UNION |
323 |
| - SELECT 'sha-512', 'hash-functions' UNION |
324 |
| - SELECT 'ripemd', 'hash-functions' UNION |
325 |
| - SELECT 'tiger', 'hash-functions' UNION |
326 |
| - SELECT 'haval', 'hash-functions' UNION |
327 |
| - SELECT 'panama', 'hash-functions' UNION |
328 |
| - SELECT 'sha0', 'hash-functions' UNION |
329 |
| - SELECT 'sha1', 'hash-functions' UNION |
330 |
| - SELECT 'sha-0', 'hash-functions' UNION |
331 |
| - SELECT 'sha-1', 'hash-functions' UNION |
332 |
| - SELECT 'whirlpool', 'hash-functions' UNION |
333 |
| -
|
334 |
| - SELECT 'blake', 'hash-functions' UNION |
335 |
| - SELECT 'grostl', 'hash-functions' UNION |
336 |
| - SELECT 'jh', 'hash-functions' UNION |
337 |
| - SELECT 'keccak', 'hash-functions' UNION |
338 |
| - SELECT 'skein', 'hash-functions' UNION |
339 |
| -
|
340 |
| - SELECT 'blake', 'sha3' UNION |
341 |
| - SELECT 'grostl', 'sha3' UNION |
342 |
| - SELECT 'jh', 'sha3' UNION |
343 |
| - SELECT 'keccak', 'sha3' UNION |
344 |
| - SELECT 'skein', 'sha3' UNION |
345 |
| - |
346 |
| - SELECT 'sha224', 'sha-family' UNION |
347 |
| - SELECT 'sha256', 'sha-family' UNION |
348 |
| - SELECT 'sha384', 'sha-family' UNION |
349 |
| - SELECT 'sha512', 'sha-family' UNION |
350 |
| - SELECT 'sha-224', 'sha-family' UNION |
351 |
| - SELECT 'sha-256', 'sha-family' UNION |
352 |
| - SELECT 'sha-384', 'sha-family' UNION |
353 |
| - SELECT 'sha-512', 'sha-family' UNION |
354 |
| - SELECT 'sha0', 'sha-family' UNION |
355 |
| - SELECT 'sha1', 'sha-family' UNION |
356 |
| - SELECT 'sha-0', 'sha-family' UNION |
357 |
| - SELECT 'sha-1', 'sha-family' UNION |
358 |
| - |
359 |
| - SELECT 'hmac', NULL UNION |
360 |
| - |
361 |
| - SELECT 'otr', NULL UNION |
362 |
| - SELECT 'socks', NULL UNION |
363 |
| -
|
364 |
| - SELECT 'vidalia', 'project-tor' UNION |
365 |
| - |
366 |
| - SELECT 'project-tor-arm', 'project-tor' UNION |
367 |
| - SELECT 'project-tor-bridgedb', 'project-tor' UNION |
368 |
| - SELECT 'project-tor-debian-polipo', 'project-tor' UNION |
369 |
| - SELECT 'project-tor-debian-tor', 'project-tor' UNION |
370 |
| - SELECT 'project-tor-flashproxy', 'project-tor' UNION |
371 |
| - SELECT 'project-tor-gettor', 'project-tor' UNION |
372 |
| - SELECT 'project-tor-jtorctl', 'project-tor' UNION |
373 |
| - SELECT 'project-tor-mat', 'project-tor' UNION |
374 |
| - SELECT 'project-tor-metrics-db', 'project-tor' UNION |
375 |
| - SELECT 'project-tor-metrics-tasks', 'project-tor'UNION |
376 |
| - SELECT 'project-tor-metrics-utils', 'project-tor' UNION |
377 |
| - SELECT 'project-tor-metrics-web', 'project-tor' UNION |
378 |
| - SELECT 'project-tor-obfsproxy', 'project-tor' UNION |
379 |
| - SELECT 'project-tor-orbot', 'project-tor' UNION |
380 |
| - SELECT 'project-tor-puppetor', 'project-tor' UNION |
381 |
| - SELECT 'project-tor-pytorctl', 'project-tor' UNION |
382 |
| - SELECT 'project-tor-thandy', 'project-tor' UNION |
383 |
| - SELECT 'project-torbutton', 'project-tor' UNION |
384 |
| - SELECT 'project-tor-dnsel', 'project-tor' UNION |
385 |
| - SELECT 'project-torsocks', 'project-tor' UNION |
386 |
| - SELECT 'project-torspec', 'project-tor' UNION |
387 |
| - SELECT 'project-vidalia-plugins', 'project-vidalia' UNION |
388 |
| - SELECT 'project-vidalia', 'project-tor' |
389 |
| - """ |
390 |
| - c.execute(sql) |
| 183 | + h = open('tags.txt', 'r') |
| 184 | + sql = 'INSERT INTO ' + DB.keyword._table + "(keyword, parent, type)\n" |
| 185 | + components = [] |
| 186 | + for l in h: |
| 187 | + parts = l.strip().split(':') |
| 188 | + parts = [p.strip() for p in parts] |
| 189 | + |
| 190 | + if len(parts) > 1: |
| 191 | + sql += "SELECT %s, %s, 1 UNION\n" |
| 192 | + components.extend(parts) |
| 193 | + else: |
| 194 | + sql += "SELECT %s, NULL, 1 UNION\n" |
| 195 | + components.append(parts[0]) |
| 196 | + sql = sql[0:-6] |
| 197 | + DB.execute(c, sql, components) |
391 | 198 |
|
392 | 199 |
|
393 | 200 | sql = "INSERT INTO " + DB.keyword._table + """(keyword, parent, type)
|
|
0 commit comments