Back to Resources
Level
Script
Security
When troubleshooting, auditing, or tracking a lost or stolen macOS device, IT professionals and MSPs need quick access to key system and network details. Manually retrieving this data can be tedious, especially in urgent situations. This script automates the collection process, providing a full system snapshot in seconds.
This script gathers essential details about a macOS device, including:
With one execution, this script provides a detailed overview of the device’s network and system state, making it an invaluable tool for security audits, network troubleshooting, and asset tracking.
#!/bin/bash
# This resource is provided as a convenience for Level users. We cannot
# guarantee it will work in all environments. Please test before deploying
# to your production environment. We welcome contributions to our community
# library
# Level Library
# https://level.io/library/script-macos-endpoint-intelligence-gathering
# Get System Details
system_profiler SPSoftwareDataType
# Get Local IP
ifconfig
# Get Remote IP
curl https://ip.level.io/json
# Get list of all visible wireless networks
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s
# Get ARP table
arp -a
macOS - Gather Intel
This macOS shell script gathers key system data including software details, local and external IP addresses, available WiFi networks, and ARP table entries for network diagnostics and troubleshooting.
Bash
300
Local system
Explore more automations, scripts, and policies to further enhance your IT operations.