<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2332&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / how to get real MAC address from hardware or kernel? [SOLVED]]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2332</link>
		<description><![CDATA[The most recent posts in how to get real MAC address from hardware or kernel? [SOLVED].]]></description>
		<lastBuildDate>Mon, 27 Aug 2018 18:22:02 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: how to get real MAC address from hardware or kernel? [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=11528#p11528</link>
			<description><![CDATA[<p>Haha. When I&#039;m after a tidbit like this, I go crazy.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 27 Aug 2018 18:22:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=11528#p11528</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to get real MAC address from hardware or kernel? [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=11527#p11527</link>
			<description><![CDATA[<p>All that in less than an hour.&#160; WOW!</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Mon, 27 Aug 2018 18:19:38 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=11527#p11527</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to get real MAC address from hardware or kernel? [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=11526#p11526</link>
			<description><![CDATA[<p>I figured it out:</p><div class="codebox"><pre><code>udevadm info -p /sys/class/net/wlan0 | grep MAC | awk -F&#039;wlx&#039; &#039;{print $2}&#039; | sed &#039;s/../&amp;:/g&#039; | cut -c 1-17 </code></pre></div><p>In the above command, <span class="bbc">sed</span> puts in colons every two characters, <span class="bbc">cut</span> removes the extraneous final colon.</p><p>If putting in the extraneous colon offends your sensibilities, here is a slightly more complicated solution (using <span class="bbc">perl</span>&#039;s <em>lookahead</em> feature) that doesn&#039;t put in the final colon:</p><div class="codebox"><pre><code>udevadm info -p /sys/class/net/wlan0 | grep MAC | awk -F&#039;wlx&#039; &#039;{print $2}&#039; | perl -pe &#039;s/(..)(?=\w)/$1:/g&#039;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 27 Aug 2018 18:16:55 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=11526#p11526</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to get real MAC address from hardware or kernel? [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=11525#p11525</link>
			<description><![CDATA[<p>P.S. My MAC spoofing script works by creating <span class="bbc">/etc/udev/rules.d/75-mac-spoof.rules</span> that looks something like this:</p><div class="codebox"><pre><code>ACTION==&quot;add&quot;, SUBSYSTEM==&quot;net&quot;, ATTR{address}==&quot;12:34:56:aa:bb:cc&quot;, RUN+=&quot;/sbin/ip link set dev %k address 12:34:56:dd:ee:ff&quot;</code></pre></div><p>Since <span class="bbc">eudev</span> is capable of changing MAC addresses, maybe there&#039;s a eudev tool that shows original addresses?</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 27 Aug 2018 18:01:23 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=11525#p11525</guid>
		</item>
		<item>
			<title><![CDATA[how to get real MAC address from hardware or kernel? [SOLVED]]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=11524#p11524</link>
			<description><![CDATA[<p>I&#039;m looking for a reliable way of getting my wireless network card&#039;s real MAC address without installing any new tools.</p><p>My MAC spoofing shell script currently finds real MAC address of wlan0 by parsing <span class="bbc">/etc/udev/rules.d/70-persistent-net.rules</span>, but this approach burned me recently because that udev file was empty for some strange reason. I tried <span class="bbc">dmidecode</span> but it does not show MAC address of wlan0. I also tried <span class="bbc">dmesg</span>, but first mention of wlan0&#039;s MAC address already shows the spoofed address. No luck with either <span class="bbc">lshw -c network</span> or <span class="bbc">lspci -vvv</span>. Some search engine hits suggest looking in <span class="bbc">/proc/net/bonding/</span>, but my system does not have this directory. The only alternative I&#039;ve found to my current approach is <span class="bbc">ethtool -P wlan0</span>, but I do not want to install an extra package (ethtool) just for this job. </p><p><strong>Please, how do I get a wireless network card&#039;s real MAC address from the hardware itself or from the kernel without installing any special tools?</strong> I know that it is possible because a long time ago I was able to do it (I think by parsing a file in /proc or /sys), but I can&#039;t remember how I did it. (Hardwiring the real MAC address as a variable in the script is not possible because I share this shell script with some other folks, so the script needs to be able to find the real MAC address by itself.)</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 27 Aug 2018 17:24:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=11524#p11524</guid>
		</item>
	</channel>
</rss>
