SNU
Sister Nivedita University
IT Asset Management & Register Portal
Username / System ID
👤
Password
🔑
🚀 Authenticate & Access Register
💻 Audit Utilities (Copy System Info Script)
🍎 Copy Script (Mac)
🪟 Copy Script (Windows)
🔒 256-Bit Encrypted PDO MySQL Authentication
bash <(cat <<'EOF' #!/bin/bash echo "==============================================" echo " MAC SYSTEM INFORMATION" echo "==============================================" echo "" # ========================================== # WIFI MAC ADDRESS # ========================================== WIFI_IFACE=$(networksetup -listallhardwareports | awk ' /Wi-Fi|AirPort/ { getline print $2 exit }') WIFI_MAC="Not Found" if [ -n "$WIFI_IFACE" ]; then WIFI_MAC=$(ifconfig "$WIFI_IFACE" 2>/dev/null | awk '/ether/ {print $2; exit}') fi # ========================================== # LAN MAC ADDRESS # ========================================== LAN_MACS=() while IFS= read -r iface; do if [ -n "$iface" ]; then mac=$(ifconfig "$iface" 2>/dev/null | awk '/ether/ {print $2; exit}') if [ -n "$mac" ]; then LAN_MACS+=("$mac") fi fi done < <( networksetup -listallhardwareports | awk ' /Ethernet/ { getline print $2 }' ) # ========================================== # BLUETOOTH MAC ADDRESS # ========================================== BT_MAC="Not Found" # Method 1 BT_MAC=$(system_profiler SPBluetoothDataType 2>/dev/null | \ grep -iE "Bluetooth Address|Controller Address|Address" | \ head -1 | \ sed 's/.*: //' | \ tr -d ' ') # Method 2 if [ -z "$BT_MAC" ] || [ "$BT_MAC" = "Not Found" ]; then BT_MAC=$(ioreg -l 2>/dev/null | \ grep -iE "Bluetooth.*Address|BD_ADDR|BluetoothAddress" | \ grep -oE '[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){5}' | \ head -1) fi # Method 3 if [ -z "$BT_MAC" ]; then BT_MAC="Not Found" fi # ========================================== # OPERATING SYSTEM # ========================================== OS_NAME=$(sw_vers -productName) OS_VERSION=$(sw_vers -productVersion) OS_BUILD=$(sw_vers -buildVersion) # ========================================== # DISPLAY RESULT # ========================================== echo "WIFI MAC Address : $WIFI_MAC" if [ -n "${LAN_MACS[0]}" ]; then echo "LAN MAC Address 1 : ${LAN_MACS[0]}" else echo "LAN MAC Address 1 : Not Found" fi if [ -n "${LAN_MACS[1]}" ]; then echo "LAN MAC Address 2 : ${LAN_MACS[1]}" else echo "LAN MAC Address 2 : Not Found" fi echo "BLUETOOTH MAC Address : $BT_MAC" echo "Operating System (OS) : $OS_NAME $OS_VERSION" echo "OS Build : $OS_BUILD" echo "" echo "==============================================" EOF )
# Windows System Information Write-Host "==========================================" Write-Host " WINDOWS SYSTEM INFORMATION" Write-Host "==========================================" # Wi-Fi $wifiNet = Get-NetAdapter | Where-Object { $_.MediaType -like "*802.11*" -or $_.Name -like "*Wi-Fi*" -or $_.InterfaceDescription -like "*Wireless*" } | Select-Object -ExpandProperty MacAddress -First 1 # LAN / Ethernet $lanNets = @(Get-NetAdapter | Where-Object { $_.MediaType -like "*802.3*" -or $_.Name -like "*Ethernet*" -or $_.Name -like "*LAN*" -or $_.InterfaceDescription -like "*Ethernet*" -or $_.InterfaceDescription -like "*LAN*" } | Select-Object -ExpandProperty MacAddress) # Bluetooth $btNet = Get-NetAdapter | Where-Object { $_.Name -like "*Bluetooth*" -or $_.InterfaceDescription -like "*Bluetooth*" } | Select-Object -ExpandProperty MacAddress -First 1 # Operating System $osInfo = (Get-CimInstance Win32_OperatingSystem).Caption # Values $wifiStr = if ($wifiNet) { $wifiNet } else { "Not Found" } $lan1Str = if ($lanNets.Count -gt 0) { $lanNets[0] } else { "Not Found" } $lan2Str = if ($lanNets.Count -gt 1) { $lanNets[1] } else { "Not Found" } $btStr = if ($btNet) { $btNet } else { "Not Found" } # Output Write-Host "" Write-Host "WIFI MAC Address : $wifiStr" Write-Host "LAN MAC Address 1 : $lan1Str" Write-Host "LAN MAC Address 2 : $lan2Str" Write-Host "BLUETOOTH MAC Address : $btStr" Write-Host "Operating System (OS) : $osInfo" Write-Host "" Write-Host "System Operational Remarks:" if (Test-Connection 8.8.8.8 -Count 1 -Quiet -ErrorAction SilentlyContinue) { Write-Host "System operational; network connectivity is available." } else { Write-Host "System operational; network connectivity could not be verified." } Write-Host "" Write-Host "=========================================="