Skip to content

Instantly share code, notes, and snippets.

@iambenmitchell
Last active September 7, 2020 12:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iambenmitchell/2d1d581d149873dea45bbbe25e3f37a4 to your computer and use it in GitHub Desktop.
Save iambenmitchell/2d1d581d149873dea45bbbe25e3f37a4 to your computer and use it in GitHub Desktop.
Get T2 Information from macOS using bash.
#NOTE: THIS SUBMITS YOUR NON PERSONAL INFO TO A DATABASE, remove the line as stated below(curl).
# The purpose of the database is to help sites like The iPhone Wiki. No personal information is collected.
#!/bin/bash
clear
ChipID=$(/usr/libexec/remotectl get-property localbridge ChipID)
BoardRevision=$(/usr/libexec/remotectl get-property localbridge BoardRevision)
BoardId=$(/usr/libexec/remotectl get-property localbridge BoardId)
HWModel=$(/usr/libexec/remotectl get-property localbridge HWModel)
macModel=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Model Identifier")
echo "This tool will get you detailed information about your T2 chip."
echo -e "Get the latest version here: https://gist.github.com/MrBenFTW/2d1d581d149873dea45bbbe25e3f37a4 \n"
macModelClean=$(echo $macModel | sed -e 's/Model Identifier://g') #remove Model Identifier: for use with curl later
clear
echo "This tool will get you detailed information about your T2 chip."
echo "Tool created by @A_MrBenMitchell,"
echo -e "Get the latest version here: https://gist.github.com/MrBenFTW/2d1d581d149873dea45bbbe25e3f37a4 \n"
echo $macModel
echo "ChipID: $ChipID"
echo "BoardRevision: $BoardRevision"
echo "BoardId: $BoardId"
echo "HWModel: $HWModel"
curlmacModel=$(echo $macModelClean) #does not work straight from $macModelClean
#REMOVE BELOW LINE FOR NO DATA COLLECTION
curl -s "https://hook.integromat.com/6cx4oh6jgvk6pa1l6snny412a84n3y98?ModelIdentifier=$curlmacModel&ChipID=$ChipID&BoardRevision=$BoardRevision&BoardId=$BoardId&HWModel=$HWModel" >/dev/null
exit
@iambenmitchell
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment