-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcli.txt
131 lines (95 loc) · 2.95 KB
/
cli.txt
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/env bash
#
# how do these commands get added to the cli?
#
# get_cli(command="blah") returns a subparser for the target (sub)command
# ace2 blah
#
# env vars
export ACE_ADMIN_PASSWORD="test"
export ACE_URI="http://localhost"
export ACE_DB="blah"
export ACE_REDIS="blah"
export ACE_STORAGE_ROOT="/path/to/files"
export ACE_PACKAGE_URL="https://ace2.io/packages"
export ACE_API_KEY="blah"
# crypto env vars (this requires some thought)
# likely autogenerated when the core starts for the first time
export ACE_CRYPTO_VERIFICATION_KEY
export ACE_CRYPTO_SALT
export ACE_CRYPTO_SALT_SIZE
export ACE_CRYPTO_ITERATIONS
export ACE_CRYPTO_ENCRYPTED_KEY
# analyze the given ipv4
# if no env vars are set, it just loads up a threaded core and uses that
# and any modules that is has available
# if ACE_URI is set, it uses a remote system interface (ignoring local modules?)
ace2 analyze ipv4 1.2.3.4
# analyze the given file
ace2 analyze file /path/to/file
# load the modules at the given target
# this replaces what we call "integrations" today
ace2 package install git@github.com:ace-ecosystem/ace2-modules.git
ace2 package install /some/path/to/ace/modules
ace2 package install http://some/url.zip
# list the loaded packages
ace2 package list
# get package info
ace2 package info blah
# remove (uninstall) a package
ace2 package uninstall blah
# list available services
ace2 service list
# starts everything that is registered to start
ace2 service start
# start a specific thing
ace2 service start core # <-- not sure this actually makes sense
ace2 service start hunter
# stops everything ace knows is running
ace2 service stop
# stops the core
ace2 service stop core # <-- ???
# print the status of everything
ace2 status
# print the status of a specific thing
ace2 status service core
# print the status of a specific module
ace2 status module blah
# print the status of a specific root
ace2 status root blah
# print the status of a specific analysis request
ace2 status request blah
# list all available analysis modules
ace2 module list
# disable the given module
ace2 module disable blah
# disable the modules of a specific type
ace2 module disable --type splunk
# enable the given module
ace2 module enable blah
# clear the entire cache
ace2 cache clear --all
# clear a specific cache entry
ace2 cache clear key
# dump the entire configuration
ace2 config get
# dump a single configuration setting
ace2 config get key
# set a configuration value
ace2 config set key value
# delete a configuration value
ace2 config delete key
# apply a yaml configuration file
ace2 config apply /path/to/config.yml
# changes admin password (prompted)
ace2 password set
# generate a new api key (requires admin password)
ace2 api create
# generate a new admin-level api key (requires admin password)
ace2 api create --admin
# delete an api key (requires admin password)
ace2 api delete name
# get the specific file
ace2 file download blah
# upload the specified file
ace2 file upload blah