You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/falcon_sensor_download/main.go
+58-16Lines changed: 58 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -17,25 +17,49 @@ import (
17
17
)
18
18
19
19
funcmain() {
20
-
clientId:=flag.String("client-id", os.Getenv("FALCON_CLIENT_ID"), "Client ID for accessing CrowdStrike Falcon Platform (default taken from FALCON_CLIENT_ID env)")
21
-
clientSecret:=flag.String("client-secret", os.Getenv("FALCON_CLIENT_SECRET"), "Client Secret for accessing CrowdStrike Falcon Platform (default taken from FALCON_CLIENT_SECRET)")
22
-
memberCID:=flag.String("member-cid", os.Getenv("FALCON_MEMBER_CID"), "Member CID for MSSP (for cases when OAuth2 authenticates multiple CIDs)")
osName:=flag.String("os-name", "", "Name of the operating system")
25
41
osVersion:=flag.String("os-version", "", "Versin of the operating system")
26
-
sensorVersion:=flag.String("sensor-version", "latest", "Version of the Falcon Sensor. Use: 'latest' to get the latest or '' to get prompted interactively")
42
+
sensorVersion:=flag.String(
43
+
"sensor-version",
44
+
"latest",
45
+
"Version of the Falcon Sensor. Use: 'latest' to get the latest or '' to get prompted interactively",
46
+
)
27
47
28
48
all:=flag.Bool("all", false, "Download all sensors")
29
49
30
50
flag.Parse()
31
51
32
52
if*clientId=="" {
33
-
*clientId=falcon_util.PromptUser(`Missing FALCON_CLIENT_ID environment variable. Please provide your OAuth2 API Client ID for authentication with CrowdStrike Falcon platform. Establishing and retrieving OAuth2 API credentials can be performed at https://falcon.crowdstrike.com/support/api-clients-and-keys.
34
-
Falcon Client ID`)
53
+
*clientId=falcon_util.PromptUser(
54
+
`Missing FALCON_CLIENT_ID environment variable. Please provide your OAuth2 API Client ID for authentication with CrowdStrike Falcon platform. Establishing and retrieving OAuth2 API credentials can be performed at https://falcon.crowdstrike.com/support/api-clients-and-keys.
55
+
Falcon Client ID`,
56
+
)
35
57
}
36
58
if*clientSecret=="" {
37
-
*clientSecret=falcon_util.PromptUser(`Missing FALCON_CLIENT_SECRET environment variable. Please provide your OAuth2 API Client Secret for authentication with CrowdStrike Falcon platform. Establishing and retrieving OAuth2 API credentials can be performed at https://falcon.crowdstrike.com/support/api-clients-and-keys.
38
-
Falcon Client Secret`)
59
+
*clientSecret=falcon_util.PromptUser(
60
+
`Missing FALCON_CLIENT_SECRET environment variable. Please provide your OAuth2 API Client Secret for authentication with CrowdStrike Falcon platform. Establishing and retrieving OAuth2 API credentials can be performed at https://falcon.crowdstrike.com/support/api-clients-and-keys.
0 commit comments