Host names scan into a LAN
I'm developing an aplication to search into a range of IPs on the LAN for NetBios names of the windows running machines. To do it, I'm using a Samba tool called "nmblookup". It returns a huge amount of netbios information about a machine, just running it with the IP as a parameter.
The way I'm looking for, is to do the same, for the linux machines. I will like to get the host name for each linux running machine on the LAN. As you do "hostname" on the prompt, and it returns its local name, but being able to ask for any ip on the LAN. Doen't not run for me any GUI software, I just need a command line utlility. Does any one an idea, where to find this?, Or may be, if it exists?
Thank you in advance,
Carles Torres
-----Mensaje original-----
De: Carles Torres Nuñez [mailto:[email protected]]
Enviado el: jueves, 18 de diciembre de 2003 9:04
Para: Lista Correo Español
Asunto: capturar los host names de una LAN
Estoy construyendo una aplicacion que busca por el rango de IPs de la LAN los nombre de NetBios de las maquinas windows que estan en funcionamiento en ese momento. Para ello utilizo la herramienta de linea de comandos que lleva samba "nmblookup", que me permite interrogar por una IP, y me retorna mucha informacion netbios sobre la maquina "escaneada".
Ahora me gustaria poder obtener tambien los host names de los PCs que tienen linux instalados. Existe alguna manera de lanzar un comando de linea al estilo de hostname, que solo funciona si estas localmente en la maquina, pero que se le pueda indicar las ip que debe mirar y retorne el nombre de host asignado. Necesitaria que fuera un programita de linea de comandos, no me sirve software con entorno grafico, por que no lo podria llamar desde mi programa.
Hasta pronto,
Carles Torres
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Assuming you have a telnet daemon running on all the *nix machines and each machine displays the /etc/issue file (some distros use /etc/issue.net). You could use regex to extract the hostname.
You could also use nmblookup to get *nix machine names if each machine has samba installed and running nmbd.
Anyways, this is not the list to discuss such topics. ----- Original Message -----
From: "Carles Torres Nuñez" <[email protected]>
To: "Lista Correo English" <[email protected]>
Sent: Thursday, December 18, 2003 12:19 AM
Subject: [LARTC] Host names scan into a LAN
Quoted 7 lines
I'm developing an aplication to search into a range of IPs on the LAN for NetBios names of the windows running machines. To do it, I'm using a Samba tool called "nmblookup". It returns a huge amount of netbios information about a machine, just running it with the IP as a parameter.
The way I'm looking for, is to do the same, for the linux machines. I will like to get the host name for each linux running machine on the LAN. As
you
Quoted 2 lines
do "hostname" on the prompt, and it returns its local name, but being able to ask for any ip on the LAN. Doen't not run for me any GUI software, I
just
Quoted 1 line
need a command line utlility. Does any one an idea, where to find this?,
Or
Quoted 14 lines
may be, if it exists?
Thank you in advance,
Carles Torres
-----Mensaje original-----
De: Carles Torres Nuñez [mailto:[email protected]]
Enviado el: jueves, 18 de diciembre de 2003 9:04
Para: Lista Correo Español
Asunto: capturar los host names de una LAN
Quoted 2 lines
Estoy construyendo una aplicacion que busca por el rango de IPs de la LAN los nombre de NetBios de las maquinas windows que estan en funcionamiento
en
Quoted 1 line
ese momento. Para ello utilizo la herramienta de linea de comandos que
lleva
Quoted 1 line
samba "nmblookup", que me permite interrogar por una IP, y me retorna
mucha
Quoted 3 lines
informacion netbios sobre la maquina "escaneada".
Ahora me gustaria poder obtener tambien los host names de los PCs que
tienen
Quoted 4 lines
linux instalados. Existe alguna manera de lanzar un comando de linea al estilo de hostname, que solo funciona si estas localmente en la maquina, pero que se le pueda indicar las ip que debe mirar y retorne el nombre de host asignado. Necesitaria que fuera un programita de linea de comandos,
no
Quoted 1 line
me sirve software con entorno grafico, por que no lo podria llamar desde
mi
Quoted 10 lines
programa.
Hasta pronto,
Carles Torres
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/