DNS check

74 views
Skip to first unread message

Brian Weaver

unread,
Jul 19, 2019, 2:32:50 PM7/19/19
to Toshiba SurePOS ACE Support group
Anyone know if there is a command like nslookup in the 4690? 

Rc

unread,
Jul 26, 2019, 10:23:12 AM7/26/19
to Toshiba SurePOS ACE Support group
Most of the networking information is in netstat, but I don't recall a name server or dns resolver function in there.... 

A simple python script can get this for you, assuming the DNS servers are defined.

Script:

     import socket

     unkwn_host = raw_input('What is the IP address to look up? ')

     try:
     fnd_host = socket.gethostbyaddr(unkwn_host)
           print '\n' + unkwn_host + ' = ' + fnd_host[0]

     except socket.herror:
     print 'Host not found.'

     except:
             print 'Input out of range'


Output looks like:

demo.jpg

Reply all
Reply to author
Forward
Message has been deleted
0 new messages