<?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=786&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / automatic mac address spoofer]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=786</link>
		<description><![CDATA[The most recent posts in automatic mac address spoofer.]]></description>
		<lastBuildDate>Wed, 12 Jun 2019 04:43:16 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=16427#p16427</link>
			<description><![CDATA[<p>thanks man this is awesome, I&#039;ll make a fresh install at some point and pack this into a live iso. <img src="https://dev1galaxy.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (czeekaj)]]></author>
			<pubDate>Wed, 12 Jun 2019 04:43:16 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=16427#p16427</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14732#p14732</link>
			<description><![CDATA[<p>@freenet_bro: You&#039;re welcome, glad I could help. It was also good to make the script more general and less complicated.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 11 Mar 2019 11:42:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14732#p14732</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14731#p14731</link>
			<description><![CDATA[<p>@GNUser: Thank you very much for the script and the explanation. I really appreciate it.</p>]]></description>
			<author><![CDATA[dummy@example.com (freenet_bro)]]></author>
			<pubDate>Mon, 11 Mar 2019 10:21:08 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14731#p14731</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14727#p14727</link>
			<description><![CDATA[<p>@freenet_bro: There are several ways to run the mac-spoofer script (either version) at boot, as root, before connecting to the internet. The two most obvious ones are via cron or via init.</p><p><strong>Option 1: Via cron</strong><br />Open up a terminal and run this command as root: <span class="bbc">EDITOR=nano crontab -e</span> then add these two lines to the bottom of the file:</p><div class="codebox"><pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
@reboot /path/to/mac-spoofer</code></pre></div><p>Reboot and enjoy.</p><p><strong>Option 2: Via init</strong><br />There are four steps required, freenet_bro: Put the script in the /etc/init.d directory, make it executable, add LSB headers to top of script, install script links in the /etc/rc?.d directories. You missed the last two steps.</p><p>Here is what the script looks like with LSB headers (if you use a network manager other than <strong>network-manager</strong>, adjust the X-Start-Before line accordingly):</p><div class="codebox"><pre class="vscroll"><code>#!/bin/sh
### BEGIN INIT INFO
# Provides:          mac-spoofer
# Required-Start:    $network
# Required-Stop:
# Should-Start:	     
# Should-Stop:       
# X-Start-Before:    network-manager
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: simple mac-spoofer
# Description:       spoof mac address before connecting to internet
### END INIT INFO

iface=wlan0
fakemac_file=/etc/fakemac-$(date +%j)

if [ -e &quot;$fakemac_file&quot; ]; then # we already have a fakemac file for today
	true 
else # remove old fakemac file and create a new one
	rm -f /etc/fakemac* 
	real_mac=$(ifconfig $iface | grep ether | awk &#039;{print $2}&#039;)
	vendor_bits=$(echo $real_mac | cut -d &#039;:&#039; -f 1-3)
	random_dec1=$(shuf --input-range=0-255 -n 1); random_hex1=$(printf &quot;%02x&quot; $random_dec1)
	random_dec2=$(shuf --input-range=0-255 -n 1); random_hex2=$(printf &quot;%02x&quot; $random_dec2)
	random_dec3=$(shuf --input-range=0-255 -n 1); random_hex3=$(printf &quot;%02x&quot; $random_dec3)
	fakemac=$(printf &quot;%s:%s:%s:%s&quot; $vendor_bits $random_hex1 $random_hex2 $random_hex3)
	printf &quot;$fakemac&quot; &gt;$fakemac_file
fi

# apply fake mac
ip link set $iface address $(cat $fakemac_file)</code></pre></div><p>To install the script links, open up a terminal and type this as root (assuming you named the script <em>mac-spoofer</em>):</p><div class="codebox"><pre><code>update-rc.d mac-spoofer defaults</code></pre></div><p>Reboot and enjoy.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Mon, 11 Mar 2019 01:01:46 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14727#p14727</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14722#p14722</link>
			<description><![CDATA[<p>I revised the scripts so that they have no special dependencies--all the utilities the scripts need are part of a standard *nix installation.</p><p>Use this version of the script to generate a random MAC address <em>at each boot</em>:</p><div class="codebox"><pre><code>#!/bin/sh

iface=wlan0

# create fake mac, preserving vendor bits:
real_mac=$(ifconfig $iface | grep ether | awk &#039;{print $2}&#039;)
vendor_bits=$(echo $real_mac | cut -d &#039;:&#039; -f 1-3)
random_dec1=$(shuf --input-range=0-255 -n 1); random_hex1=$(printf &quot;%02x&quot; $random_dec1)
random_dec2=$(shuf --input-range=0-255 -n 1); random_hex2=$(printf &quot;%02x&quot; $random_dec2)
random_dec3=$(shuf --input-range=0-255 -n 1); random_hex3=$(printf &quot;%02x&quot; $random_dec3)
fakemac=$(printf &quot;%s:%s:%s:%s&quot; $vendor_bits $random_hex1 $random_hex2 $random_hex3)

# apply fake mac
ip link set $iface address $fakemac</code></pre></div><p>Use this version of the script if you want to keep a fake MAC address for a <em>whole day</em>, regardless of how many times you reboot: </p><div class="codebox"><pre><code>#!/bin/sh

iface=wlan0
fakemac_file=/etc/fakemac-$(date +%j)

if [ -e &quot;$fakemac_file&quot; ]; then # we already have a fakemac file for today
	true 
else # remove old fakemac file and create a new one
	rm -f /etc/fakemac* 
	real_mac=$(ifconfig $iface | grep ether | awk &#039;{print $2}&#039;)
	vendor_bits=$(echo $real_mac | cut -d &#039;:&#039; -f 1-3)
	random_dec1=$(shuf --input-range=0-255 -n 1); random_hex1=$(printf &quot;%02x&quot; $random_dec1)
	random_dec2=$(shuf --input-range=0-255 -n 1); random_hex2=$(printf &quot;%02x&quot; $random_dec2)
	random_dec3=$(shuf --input-range=0-255 -n 1); random_hex3=$(printf &quot;%02x&quot; $random_dec3)
	fakemac=$(printf &quot;%s:%s:%s:%s&quot; $vendor_bits $random_hex1 $random_hex2 $random_hex3)
	printf &quot;$fakemac&quot; &gt;$fakemac_file
fi

# apply fake mac
ip link set $iface address $(cat $fakemac_file)</code></pre></div><p>BTW, notice that the scripts preserve the first 3 bytes of the MAC address, fake only the last 3 bytes. The point of this is that the first 3 bytes identify the network device&#039;s vendor/manufacturer. You don&#039;t want the vendor bytes to be random: Doing so would make your MAC address <strong>obviously</strong> fake and you would stand out. Not what we want.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Sun, 10 Mar 2019 13:09:53 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14722#p14722</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14705#p14705</link>
			<description><![CDATA[<p>cool, the script works.</p><p>But I don&#039;t know how to run it at boot time.<br />I&#039;ve used `chmod +x mac-spoofer&#039; to make it executable and copied it to `/etc/init.d/&#039;.</p><p>Have I missed something?</p>]]></description>
			<author><![CDATA[dummy@example.com (freenet_bro)]]></author>
			<pubDate>Sat, 09 Mar 2019 16:27:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14705#p14705</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14693#p14693</link>
			<description><![CDATA[<p>@siva: Simplicity and total customizability. Why install a package when a simple shell script will do? </p><p>@freenet_bro: See posts #7 and #8.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Fri, 08 Mar 2019 20:39:03 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14693#p14693</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=14692#p14692</link>
			<description><![CDATA[<p>This script doesn&#039;t seem to work for computers connected via ethernet.<br />Is there a similar script for that or how would I need to modify the script you posted?</p>]]></description>
			<author><![CDATA[dummy@example.com (freenet_bro)]]></author>
			<pubDate>Fri, 08 Mar 2019 18:44:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=14692#p14692</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=7295#p7295</link>
			<description><![CDATA[<p>Thank you for sharing this.&#160; My only question is, how does this differ from macchanger?</p>]]></description>
			<author><![CDATA[dummy@example.com (siva)]]></author>
			<pubDate>Thu, 25 Jan 2018 20:42:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=7295#p7295</guid>
		</item>
		<item>
			<title><![CDATA[Re: automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=3135#p3135</link>
			<description><![CDATA[<p>Thank you.<br />There is _much_ here that is useful and good <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (PeteGozz)]]></author>
			<pubDate>Wed, 05 Jul 2017 02:57:14 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=3135#p3135</guid>
		</item>
		<item>
			<title><![CDATA[automatic mac address spoofer]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=2759#p2759</link>
			<description><![CDATA[<p>If you are paranoid about privacy like me, you will like this little creation of mine.</p><p>EDIT: Final version of script is in post #7. Options for running it automatically at appropriate time are in post #8.</p>]]></description>
			<author><![CDATA[dummy@example.com (GNUser)]]></author>
			<pubDate>Sun, 02 Jul 2017 18:37:16 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=2759#p2759</guid>
		</item>
	</channel>
</rss>
