1 | 'use strict';
|
2 |
|
3 |
|
4 | const program = require('commander');
|
5 | const processor = require('./processor');
|
6 |
|
7 |
|
8 | module.exports = (version, args) => {
|
9 |
|
10 | program
|
11 | .version(version)
|
12 | .usage("[options] passwordfile realm username")
|
13 | .option('-c, --create', "Create a new file.");
|
14 |
|
15 |
|
16 | program.on('--help', () => {
|
17 | console.log(`
|
18 | Examples:
|
19 |
|
20 | htdigest [-c] passwordfile realm username
|
21 |
|
22 | `);
|
23 | });
|
24 |
|
25 |
|
26 | program.parse(args);
|
27 |
|
28 |
|
29 | processor.exec(program);
|
30 | }; |
\ | No newline at end of file |