-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.js
40 lines (35 loc) · 1.1 KB
/
index.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
'use strict';
const run = require('./cli/run');
const generate = require('./cli/generate');
//setup the cli
//hash ./laravel
const { Command } = require('commander');
const program = new Command();
program
.name('HASH')
.description('HTTP Agnostic Software Honeypot')
.version('1.0.3');
program
.command('run')
.description('Run HASH')
.argument('<folder>', 'path/to the template folder')
.option(
'-l, --log <transport>',
'logging transport',
'console,file,datadog'
)
.option('-f, --log_file <filename>', 'logging filename', 'hash.log')
.action((appFolder, options) => {
run(appFolder, options);
});
program
.command('generate')
.description('Generate honeypot profile')
.argument('<folder>', 'path/to the app')
.option('-t --template <template_name>', 'base template', 'default')
.option('-n --name <honeypot_name>', 'Honeypot name')
.option('-s --swagger <swagger_file>', 'Path to swagger file to convert')
.action(async (appFolder, options) => {
await generate(appFolder, options);
});
program.parse();