I have a router in my local network (Model: D-Link Micro Httd), and I know its IP address. I want to find the model of router programattically using C#. Also on the router the SNMP service is disabled and I forgot the admin password. I used the LanSweeper NMS, and it finds the model, and also I used the nMap and it finds the model too. Also I used the UPnP APIs, but even it can't find the router.
How do this Apps find the router's model, whereas the SNMP service is disabled and I forgot the admin password?
If you can get the devices MAC address, then you can use an online service like this one here to fetch the associated metadata stored against the MAC address.
http://www.macvendorlookup.com/api
An example would be:
http://www.macvendorlookup.com/api/v2/00-23-AB-7B-58-99
Which returns the following:
UPDATE: However you specifically mention the Model Number. Sadly this isn't going to be available on a publicly facing API and UPNP might work for you. But if the router doesn't have UPNP enabled OR it's blocked, then this won't work either. Check out Port Mapper (written in Java) for some inspiration.
https://github.com/kaklakariada/portmapper