I am getting answer in PHP but its not working because of session.
//Get the ipconfig details using system commond
system('ipconfig /all');
// Capture the output into a variable
$mycomsys=ob_get_contents();
// Clean (erase) the output buffer
$find_mac = "Physical"; //find the "Physical" & Find the position of Physical text
$pmac = strpos($mycomsys, $find_mac);
// Get Physical Address
$macaddress=substr($mycomsys,($pmac+36),17);
ob_clean();
//Display Mac Address
exec("/sbin/ifconfig eth0 | grep HWaddr", $output);
print_r( $output);die();
This fulfils my requirement but not running for my applications, So I am in need of the same in JavaScript.