mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-06-11 03:40:32 +01:00
v1.0.0 = Initial Production Version
+ Initial Production Version
This commit is contained in:
53
Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeStatus.sh
Normal file
53
Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeStatus.sh
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
###################################################################################################
|
||||
# Script Name: jamf_ea_CrowdStrikeStatus.sh
|
||||
# By: Zack Thompson / Created: 1/8/2019
|
||||
# Version: 1.0.0 / Updated: 1/8/2019 / By: ZT
|
||||
#
|
||||
# Description: This script gets the configuration of Crowd Strike.
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
echo "Checking the Crowd Strike configuration..."
|
||||
|
||||
##################################################
|
||||
# Define Variables for each item that we want to check for
|
||||
customerID="12345678-90AB-CDEF-1234-567890ABCDEF"
|
||||
cloudConnectionState="102"
|
||||
# A value of 102 indicates the host is connected directly to the CrowdStrike cloud.
|
||||
# A value of 126 indicates the host is connected to the CrowdStrike cloud via a proxy.
|
||||
|
||||
# Get the current values for the items we want to check
|
||||
csCustomerID=$( /usr/sbin/sysctl -n cs.customerid 2>&1 )
|
||||
csCloudConnectionState=$( /usr/sbin/sysctl -n cs.comms.cloud_connection_state 2>&1 )
|
||||
kextsEnabled=$( /usr/bin/sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy "select * from kext_policy where team_id='X9E956P446' and allowed='0';" | /usr/bin/wc -l | /usr/bin/xargs )
|
||||
|
||||
# Hold statuses
|
||||
returnResult=""
|
||||
|
||||
##################################################
|
||||
# Bits staged, collect the information...
|
||||
|
||||
if [[ "${csCustomerID}" != "${customerID}" ]]; then
|
||||
returnResult+="Invalid Customer ID;"
|
||||
fi
|
||||
|
||||
if [[ "${csCloudConnectionState}" != "${cloudConnectionState}" ]]; then
|
||||
returnResult+=" Disconnected State;"
|
||||
fi
|
||||
|
||||
if [[ "${kextsEnabled}" != "2" ]]; then
|
||||
returnResult+=" KEXTs are not enabled;"
|
||||
fi
|
||||
|
||||
##################################################
|
||||
# Return any errors or the all good.
|
||||
|
||||
if [[ -n "${returnResult}" ]]; then
|
||||
echo "<result>${returnResult%?}</result>"
|
||||
else
|
||||
echo "<result>Running</result>"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
24
Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeVersion.sh
Normal file
24
Jamf Pro/Extension Attributes/jamf_ea_CrowdStrikeVersion.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
###################################################################################################
|
||||
# Script Name: jamf_ea_CrowdStrikeVersion.sh
|
||||
# By: Zack Thompson / Created: 1/8/2019
|
||||
# Version: 1.0.0 / Updated: 1/8/2019 / By: ZT
|
||||
#
|
||||
# Description: This script gets the version of Crowd Strike.
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
echo "Checking the Crowd Strike Version..."
|
||||
|
||||
# Querty for the version string
|
||||
csVersion=$( /usr/sbin/sysctl -n cs.version 2>&1 )
|
||||
|
||||
# Check if the command was successful
|
||||
if [[ $? == "0" ]]; then
|
||||
echo "<result>${csVersion}</result>"
|
||||
else
|
||||
echo "<result>Not installed or running</result>"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user