maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Change mac address (https://talk.maemo.org/showthread.php?t=33774)

Chippeer 2009-10-31 15:11

Change mac address
 
Hi, is it possible to change mac address of N900 via xterminal? Thank you for your posts

allnameswereout 2009-10-31 15:26

Re: Change mac address
 
Should be possible with ifconfig. First bring down your WLAN, or make sure it isn't in use.

Then, as root:

ifconfig wlan0 hw ether 00:00:00:00:00:00

Chippeer 2009-10-31 18:43

Re: Change mac address
 
I know how to change, but i asked if is it possible, because some drivers doesn't support this function...

VII 2010-01-11 22:58

Re: Change mac address
 
Yes it is posible.

forcer 2010-01-11 23:19

Re: Change mac address
 
there is macchanger in extras-devel, but be sure you know what you're doing, because extras-devel includes software that is untested, unstable and might brick your device, proceed with caution, you have been warned.

connelhooley 2010-10-18 10:45

Re: Change mac address
 
Is there a way to set it up so that the mac address gets automatically changed on start-up?

hawaii 2010-10-18 12:32

Re: Change mac address
 
Put it in an upstart script.

h4xx0r 2011-04-11 11:49

Re: Change mac address
 
I wrote a little handy script that help me a lot when needing a new mac fast on my n900 (its just bash so it works on every linux dist that names their vlan interface wlan0):

Create a file in /usr/bin/ called macchanger, make it executable:
chmod +x /usr/bin/macchanger
edit /usr/bin/macchanger and insert this text:

#!/bin/bash
echo "they block my mac"
ifconfig wlan0 down
ole=`ifconfig wlan0|grep HWaddr|awk '{print $5}'`
one=`df |md5sum |awk '{print }'|grep -o ..`
two=`free |md5sum |grep -o ..`
thr=`ps auxww |md5sum |grep -o ..`
ifconfig wlan0 hw ether 00:1F:DF:`echo $one`:`echo $two`:`echo $thr`
new=`ifconfig wlan0|grep HWaddr|awk '{print $5}'`
ifconfig wlan0 up
echo $ole "->" $new
echo "i fist their fish"

Reason i am using 3 strings md5sumed is to get decent randomization as this is hard to accomplish in bash

hawaii 2011-04-11 14:33

Re: Change mac address
 
You do realize that `macchanger` is in the repositories?

anagarika 2012-01-04 09:09

Re: Change mac address
 
Quote:

Originally Posted by h4xx0r (Post 985550)
I wrote a little handy script that help me a lot when needing a new mac fast on my n900 (its just bash so it works on every linux dist that names their vlan interface wlan0):

Create a file in /usr/bin/ called macchanger, make it executable:
chmod +x /usr/bin/macchanger
edit /usr/bin/macchanger and insert this text:

#!/bin/bash
echo "they block my mac"
ifconfig wlan0 down
ole=`ifconfig wlan0|grep HWaddr|awk '{print $5}'`
one=`df |md5sum |awk '{print }'|grep -o ..`
two=`free |md5sum |grep -o ..`
thr=`ps auxww |md5sum |grep -o ..`
ifconfig wlan0 hw ether 00:1F:DF:`echo $one`:`echo $two`:`echo $thr`
new=`ifconfig wlan0|grep HWaddr|awk '{print $5}'`
ifconfig wlan0 up
echo $ole "->" $new
echo "i fist their fish"

Reason i am using 3 strings md5sumed is to get decent randomization as this is hard to accomplish in bash

After installing enhanced bash package, these lines don't work anymore:
Code:

one=`df |md5sum |awk '{print }'|grep -o ..`
two=`free |md5sum |grep -o ..`
thr=`ps auxww |md5sum |grep -o ..`

It (the ifconfig) stops at $one, resulting in truncated addreas (only 4 out of 6, ie 00:1F:DF:xx). Tried changing to:
Code:

one=`df |md5sum |awk '{print }'|head -c 2`
two=`free |md5sum |head -c 2`
thr=`ps auxww |md5sum |head -c 2`

Now it works again :)


All times are GMT. The time now is 08:14.

vBulletin® Version 3.8.8