Source language: Translate to:

get hostname from IP

General questions about NeoBook

Moderator: Neosoft Support

get hostname from IP

Postby TinTin » Fri Jan 08, 2016 7:27 am

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
TinTin
 
Posts: 162
Joined: Sun Dec 06, 2009 4:03 am
Location: UK

Re: get hostname from IP

Postby dpayer » Mon Jan 11, 2016 2:59 pm

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.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: get hostname from IP

Postby mishem » Mon Jan 11, 2016 5:17 pm

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
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest