Hi all.
I need getting machine name by windows port 137 - netbios.
my code:
require ‘socket’
client_socket = Socket.new(Socket::AF_INET, Socket::SOCK_DGRAM, 0)
sockaddr = Socket.pack_sockaddr_in( 137, ‘10.0.5.53’ )
client_socket.connect(sockaddr)
reply, from = client_socket.recvfrom( 20, 0 )
puts reply
client_socket.close
what is ploblem??
Thanks.
Bráulio.