Page 1 of 1

get hostname from IP

PostPosted: Fri Jan 08, 2016 7:27 am
by TinTin
Hi Neobookers...

Any easy way to do this in NB? I was having a search through a few plugins can't seem to be able to find anything, however I'm sure it could be done in JS function but need it to be FAST!

cheers in advance

Re: get hostname from IP

PostPosted: Mon Jan 11, 2016 2:59 pm
by dpayer
You can use the command line utility ping with the /a

If you use the pipe command you can turn this into a file and then read it. Example:

C:\Users\d_payer>ping /a 8.8.8.8 >capturefile.txt

Pinging google-public-dns-a.google.com [8.8.8.8] with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=37ms TTL=54
Reply from 8.8.8.8: bytes=32 time=43ms TTL=54
Reply from 8.8.8.8: bytes=32 time=46ms TTL=54
Reply from 8.8.8.8: bytes=32 time=37ms TTL=54

and that data will be written to the capturefile.txt file and you can read the first line for your host name.

Re: get hostname from IP

PostPosted: Mon Jan 11, 2016 5:17 pm
by mishem
You can use the command line utility ping with the /a


You can also use plug-in dmCMDLine.
http://neobooker.ru/forum/37-2893-1

Download
https://app.box.com/s/prt6q0ysasr6t0rp7l6ebbx4ss4w2jjj