@@ -21,16 +21,20 @@ $ python setup.py install
2121
2222First, set your profile:
2323``` bash
24- code42 profile set -s https://example.authority.com -u security.admin@example.com
24+ code42 profile set --profile MY_FIRST_PROFILE - s https://example.authority.com -u security.admin@example.com
2525```
26+ The ` --profile ` flag is required the first time and it takes a name.
27+ On subsequent uses of ` set ` , not specifying the profile will set the default profile.
28+
2629Your profile contains the necessary properties for logging into Code42 servers.
27- After running this ` code42 profile set ` , you will be prompted about storing a password.
28- If you agree, you will be securely prompted to input your password.
29- Your password is not stored in plain-text, and is not shown when you do ` code42 profile show ` .
30- However, ` code42 profile show ` will confirm that there is a password set for your profile.
30+ After running ` code42 profile set ` , the program prompts you about storing a password.
31+ If you agree, you are then prompted to input your password.
32+
33+ Your password is not stored in plain-text and is not shown when you do ` code42 profile show ` .
34+ However, ` code42 profile show ` will confirm that a password exists for your profile.
3135If you do not set a password, you will be securely prompted to enter a password each time you run a command.
3236
33- To ignore SSL errors, do:
37+ For development purposes, you may need to ignore ssl errors. If you need to do this , do:
3438``` bash
3539code42 profile set --disable-ssl-errors
3640```
@@ -40,7 +44,19 @@ To re-enable SSL errors, do:
4044code42 profile set --enable-ssl-errors
4145```
4246
43- Next, you can query for events and send them to three possible destination types
47+ You can add multiple profiles with different names and the change the default profile with the ` use ` command:
48+ ``` bash
49+ code42 profile use MY_SECOND_PROFILE
50+ ```
51+ When the ` --profile ` flag is available on other commands, such as those in ` securitydata ` ,
52+ it will use that profile instead of the default one.
53+
54+ To see all your profiles, do:
55+ ``` bash
56+ code42 profile list
57+ ```
58+
59+ Using the CLI, you can query for events and send them to three possible destination types:
4460* stdout
4561* A file
4662* A server, such as SysLog
@@ -58,6 +74,12 @@ code42 securitydata print -b 2020-02-02 12:51
5874```
5975Begin date will be ignored if provided on subsequent queries using ` -i ` .
6076
77+ Use different format with ` -f ` :
78+ ``` bash
79+ code42 securitydata print -b 2020-02-02 -f CEF
80+ ```
81+ The available formats are CEF, JSON, and RAW-JSON.
82+
6183To write events to a file, do:
6284``` bash
6385code42 securitydata write-to filename.txt -b 2020-02-02
@@ -74,6 +96,16 @@ code42 securitydata send-to syslog.company.com -i
7496```
7597This is only guaranteed if you did not change your query.
7698
99+ To send events to a server using a specific profile, do:
100+ ``` bash
101+ code42 securitydata send-to --profile PROFILE_FOR_RECURRING_JOB syslog.company.com -b 2020-02-02 -f CEF -i
102+ ```
103+
104+ You can also use wildcard for queries, but note, if they are not in quotes, you may get unexpected behavior.
105+ ``` bash
106+ code42 securitydata print --actor " *"
107+ ```
108+
77109
78110Each destination-type subcommand shares query parameters
79111* ` -t ` (exposure types)
@@ -92,7 +124,7 @@ Each destination-type subcommand shares query parameters
92124* ` --advanced-query ` (raw JSON query)
93125
94126You cannot use other query parameters if you use ` --advanced-query ` .
95- To learn more about acceptable arguments, add the ` -h ` flag to ` code42 ` or and of the destination-type subcommands.
127+ To learn more about acceptable arguments, add the ` -h ` flag to ` code42 ` or any of the destination-type subcommands.
96128
97129
98130# Known Issues
0 commit comments