1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Conocer el fabricante del gateway de nuestra red # Obtener la dirección IP del gateway $gateway = ((Get-NetIPConfiguration | select IPv4DefaultGateway).IPv4DefaultGateway.NextHop) # Get-NetRoute | select NextHop | where NextHop -match "10.20" Start-Sleep -Seconds 5 # Obtener la dirección MAC del gateway con la dirección IP $mac = (Get-NetNeighbor | where IPAddress -eq $gateway).LinkLayerAddress Start-Sleep -Seconds 5 # Detectar el fabricante utilizando la dirección MAC foreach($linea in (iwr https://gitlab.com/wireshark/wireshark/-/raw/master/manuf).content -split "`n") { $linea | select-string $mac.Substring(0,8).replace("-",":") } |