@@ -21,16 +21,20 @@ $ python setup.py install
21
21
22
22
First, set your profile:
23
23
``` bash
24
- code42 profile
set -s https://example.authority.com -u
[email protected]
24
+ code42 profile
set -
-profile MY_FIRST_PROFILE - s https://example.authority.com -u
[email protected]
25
25
```
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
+
26
29
Your 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.
31
35
If you do not set a password, you will be securely prompted to enter a password each time you run a command.
32
36
33
- To ignore SSL errors, do:
37
+ For development purposes, you may need to ignore ssl errors. If you need to do this , do:
34
38
``` bash
35
39
code42 profile set --disable-ssl-errors
36
40
```
@@ -40,7 +44,19 @@ To re-enable SSL errors, do:
40
44
code42 profile set --enable-ssl-errors
41
45
```
42
46
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:
44
60
* stdout
45
61
* A file
46
62
* A server, such as SysLog
@@ -58,6 +74,12 @@ code42 securitydata print -b 2020-02-02 12:51
58
74
```
59
75
Begin date will be ignored if provided on subsequent queries using ` -i ` .
60
76
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
+
61
83
To write events to a file, do:
62
84
``` bash
63
85
code42 securitydata write-to filename.txt -b 2020-02-02
@@ -74,6 +96,16 @@ code42 securitydata send-to syslog.company.com -i
74
96
```
75
97
This is only guaranteed if you did not change your query.
76
98
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
+
77
109
78
110
Each destination-type subcommand shares query parameters
79
111
* ` -t ` (exposure types)
@@ -92,7 +124,7 @@ Each destination-type subcommand shares query parameters
92
124
* ` --advanced-query ` (raw JSON query)
93
125
94
126
You 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.
96
128
97
129
98
130
# Known Issues
0 commit comments