How to programmatically determine your network router model

I have a router on my LAN (Model: D-Link Micro Httd) and I know its IP address. I want to find a router model using C #. Also the SNMP service is disabled on the router and I forgot the admin password. I used LanSweeper NMS and it found the model and also I used nMap and it finds the model as well. Also I used UPnP API but even it can't find the router.

How does this application find the router model when the SNMP service is disabled and I forgot the admin password?

0


source to share


1 answer


If you can get the MAC address of a device, you can use an online service like this to get the associated metadata stored in the MAC address.

http://www.macvendorlookup.com/api

Example:

http://www.macvendorlookup.com/api/v2/00-23-AB-7B-58-99



Which returns the following:

[
   {
      "startHex":"0023AB000000",
      "endHex":"0023ABFFFFFF",
      "startDec":"153192759296",
      "endDec":"153209536511",
      "company":"CISCO SYSTEMS, INC.",
      "addressL1":"170 W. TASMAN DRIVE",
      "addressL2":"M\/S SJA-2",
      "addressL3":"SAN JOSE CA 95134-1706",
      "country":"UNITED STATES",
      "type":"oui24"
   }
]

      

UPDATE: However, you are specifying the model number specifically. Unfortunately this won't be available for the public API and UPNP might work for you. But if the router does not support UPNP OR is blocked, then that will not work either. Check out Port Mapper (written in Java) for some inspiration.

https://github.com/kaklakariada/portmapper

0


source







All Articles