MAC address of a machine

Hi   Any one knows how to get MAC address of a machine who is accessing your application.Help me.

a method like the one below will find the ethernet mac address of my Mac on OS-X 10.4

def mac_address     system "ifconfig | grep lladdr > mac.txt"     f = File.new("mac.txt")     mac = ""     f.each{|l| mac = l.split(" ").last}     return mac end

It's really quite hacky, but you're going to need to make a system call to do that. At least I cannot think of any classes available for it. On windows maybe the Win32ole or Win32API classes but nothing on and BSD platforms.

cammo

a method like the one below will find the ethernet mac address of my Mac on OS-X 10.4

def mac_address    system "ifconfig | grep lladdr > mac.txt"    f = File.new("mac.txt")    mac = ""    f.each{|l| mac = l.split(" ").last}    return mac end

output = `ifconfig | grep lladd` at least avoids the temporary file
unpleasantness (or use IO.popen)

Fred

nearly impossible