.NET
Boas,
Podes tentar fazer o seguinte, quando fazes um ping para um determinado IP ou Nome na rede, se executares o "arp -a" na minha de comandos vais ter uma lista dos ip's e mac address's das máquinas.
Podes tentar desenvolver alguma coisa que faça um "ping xpto" e depois com o "arp -a" tenhas os mac's dessas máquinas.
Tens também a possibilidade de fazer isso em .NET:
........... Retirado do forum MSDN ...............
Import the System.Management
Import System.Management.Instrumentation
Dim theManagementScope as new ManagementScope("\\" & ComputerName & "\root\cimv2")
Dim theQueryString as new string = "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = 1"
Dim theObjectQuery as new ObjectQuery(theQueryString)
Dim theSearcher as new ManagementObjectSearcher(theManagementScope, theObjectQuery)
Dim theResultsCollection as ManagementObjectCollection = theSearcher.Get()
for each currentResult as ManagementObject in theResultsCollection
MessageBox.Show(currentResult("MacAddress").ToString())
next
.....................................................
Para ter o UserName(Na máquina local)
My
.User.Name
....................................................
Ver Sistema Operativo nunca testei com outros sistemas operativos, mas deve funcionar. Retirado de um forum na web.
Dim strText As String = ""
Dim scope As ManagementScope
scope = New ManagementScope("\\192.168.0.1\root\cimv2")
scope.Connect()
Dim query As ObjectQuery
query = New ObjectQuery("SELECT * FROM Win32_OperatingSystem")
Dim searcher As ManagementObjectSearcher
searcher = New ManagementObjectSearcher(scope, query)
Dim queryCollection As ManagementObjectCollection
queryCollection = searcher.Get()
Dim m As ManagementObject
For Each m In queryCollection
If InStr(m("Caption"), "Server 2003") Then
strText = m("Caption")
If m("ServicePackMajorVersion") = "2" Then
strText = strText & ", Service Pack 2"
End If
MsgBox(strText)
Else
MsgBox("This computer is not running Windows Server 2003.")
End If
Next
...................................................................
Normalmente quando quero fazer alguma coisa e não sei, uso o google como pesquisa do tipo(how to get the remote ip computer .net),(how to get the remote mac address .net), etc....
Vão aparecer imensas páginas de código, vais aproveitando um bocadinho aqui outro ali, no final vais ficar a perceber o que estas a fazer e como fazer.
Abraços