#!/bin/bash
# MAC Vendor Lookup Script

MAC="bc:24:11:ee:a6:ec"
OUI=$(echo $MAC | tr '[:lower:]' '[:upper:]' | sed 's/[:-]//g' | cut -c1-6)

echo "MAC Address: $MAC"
echo "OUI: $OUI"
echo ""
echo "Looking up vendor..."

# Try online lookup (if curl available)
if command -v curl > /dev/null 2>&1; then
    VENDOR=$(curl -s "https://api.macvendors.com/$OUI" 2>/dev/null)
    if [ -n "$VENDOR" ] && [ "$VENDOR" != "Not Found" ]; then
        echo "Vendor: $VENDOR"
    else
        echo "Vendor: Not found in online database"
    fi
else
    echo "curl not available for online lookup"
fi

echo ""
echo "Note: bc:24:11 pattern suggests this might be:"
echo "- A virtual MAC address (LXC containers often use bc:24:11)"
echo "- A Proxmox-generated MAC address"
echo "- A specific vendor's MAC range"
