I have a list of IP addresses and they are probably of the IOT devices. How can I figure out the OS of the device(I only have its IP address) using any script/tool/service ? Any help would be immensely appreciated. I am new to this. Thanks.
Find device information from IP address
2.6k views Asked by Akmal Alshamsi At
2
There are 2 answers
0
On
You can do this with Shodan. Shodan includes the operating system when possible and also gives you a lot of additional information to decide whether it's an IoT device or not. Here's some sample code in Python to get you started:
from shodan import Shodan
# Setup the API connection
api = Shodan("YOUR API KEY") # Get it from https://account.shodan.io
# Lookup the IP information
host = api.host("66.96.212.7")
# If Shodan was able to identify the operating system then it will have
# an "os" property
if 'os' in host and host['os']:
print(host['os'])
# You can also look at the list of ports running on the IP to determine
# whether it's an IoT device
print(host['ports'])
# Or you can look at the "tags" property as that sometimes includes an "iot" tag
print(host['tags'])
Look at this (for an example):
you can try to write your own telnet script (open session, send some command and retrieve information that you need).