Does Puppy have a spoofing of hardware address for WiFi?
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Thanks stemsee I will give it a test run and report back sometime this weekend.stemsee wrote:Thanks perdido
That's a very comprehensive test out!
Here is the slight update ... not widely tested though. But the problems were probably because of not removing the directory in /tmp
To be honest I don't really have a good reason to worry about my mac but I like the idea of obfuscation. Anything to muddy up the waters a bit

.
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Hi stemsee,
Your latest RandomMac.sfs is working in both puppy precise 5.7.1 and upupbb32 19.03
Will probably work on many other puppy versions too
I installed the .SFS and launched from Menu-->Network-->MacSpoofing in both precise and bionic
If you want it to launch at bootup put a copy of the RandomMac.sh script in /root/Startup/
Since this utility changes mac address a reconnect is required after mac address changes.
Simple Network Setup (SNS) seems to handle the mac change better than frisbee, it automatically disconnects and reconnects with no input from user.
Frisbee has required a manual reconnect even though set to autoconnect.
There is room for more testing with the different network managers in puppy if anyone cares to report.
My connection is through a wireless access point using the cell phone
You can verify mac changes by running ifconfig from console.
My wireless printer still works normally after mac changes.
Thank you stemsee!
.
Your latest RandomMac.sfs is working in both puppy precise 5.7.1 and upupbb32 19.03
Will probably work on many other puppy versions too

I installed the .SFS and launched from Menu-->Network-->MacSpoofing in both precise and bionic
If you want it to launch at bootup put a copy of the RandomMac.sh script in /root/Startup/
Since this utility changes mac address a reconnect is required after mac address changes.
Simple Network Setup (SNS) seems to handle the mac change better than frisbee, it automatically disconnects and reconnects with no input from user.
Frisbee has required a manual reconnect even though set to autoconnect.
There is room for more testing with the different network managers in puppy if anyone cares to report.
My connection is through a wireless access point using the cell phone
You can verify mac changes by running ifconfig from console.
My wireless printer still works normally after mac changes.
Thank you stemsee!

.
You're welcome
Here is a more compact and useable version using yad --paned. This does away with the first interface selection dialog, which is now in the main gui and is dynamic, just select to operate on selected interface. Also the display fields are one line deep and are read only.
Here is a more compact and useable version using yad --paned. This does away with the first interface selection dialog, which is now in the main gui and is dynamic, just select to operate on selected interface. Also the display fields are one line deep and are read only.
- Attachments
-
- xscreenshot-20191231T204746.png
- (12.71 KiB) Downloaded 234 times
-
- xscreenshot-20191231T204755.png
- (13.44 KiB) Downloaded 234 times
Last edited by stemsee on Thu 02 Jan 2020, 15:06, edited 1 time in total.
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Hi stemsee, thanks for the new version to test.
On upupbb32 it works as intended. Yad_0.40.0 is included in peebee's .iso
It was a little confusing when I saw the new way of choosing the interface, I was expecting the choice to show up in the Selected Interface window after mouse clicking. It did show up after I mouse clicked New Mac
On precise5.7.1 I have yad_0.33.0 installed (I had to add that for dogradio) and the new way of choosing the interface does not work. I attached a pic of what happens. I suspect it is just the older Yad version since it worked with the previous sfs you shared where we manually type in the interface.
One other minor thing, desktop file in the new sfs somehow got replaced with the desktop from MakeSaveSwapfile
On upupbb32 it works as intended. Yad_0.40.0 is included in peebee's .iso
It was a little confusing when I saw the new way of choosing the interface, I was expecting the choice to show up in the Selected Interface window after mouse clicking. It did show up after I mouse clicked New Mac
On precise5.7.1 I have yad_0.33.0 installed (I had to add that for dogradio) and the new way of choosing the interface does not work. I attached a pic of what happens. I suspect it is just the older Yad version since it worked with the previous sfs you shared where we manually type in the interface.
One other minor thing, desktop file in the new sfs somehow got replaced with the desktop from MakeSaveSwapfile
- Attachments
-
- yad_0.33.0_2020-01-02_020827.jpg
- This is from precise 5.7.1 with Yad_0.33.0 just to show what happened with the older Yad version
- (20.73 KiB) Downloaded 192 times
Hi perdido
Thanks for your persistence. I only tested on fatdog.
I made a very important discovery concerning yad, when trying to get this to work as you would expect ... that is select interface and see it reflected in the appropriate field immediately (now working). Also now has double-click interface to function (change mac etc). I could remove all the buttons and acheive same functionality.
This script has specifier quoted ... "%s".
Corrected the .desktop file.
What I have discovered will improve what coders can accomplish with a yad gui (probably already known by some ... ).
cheers
stemsee
Thanks for your persistence. I only tested on fatdog.
I made a very important discovery concerning yad, when trying to get this to work as you would expect ... that is select interface and see it reflected in the appropriate field immediately (now working). Also now has double-click interface to function (change mac etc). I could remove all the buttons and acheive same functionality.
This script has specifier quoted ... "%s".
Corrected the .desktop file.
What I have discovered will improve what coders can accomplish with a yad gui (probably already known by some ... ).
cheers
stemsee
- Attachments
-
- xscreenshot-20200102T145546.png
- app startup
- (12.67 KiB) Downloaded 214 times
-
- xscreenshot-20200102T145602.png
- selected iface
- (12.87 KiB) Downloaded 215 times
-
- xscreenshot-20200102T145622.png
- double-clicked iface
- (13.75 KiB) Downloaded 213 times
-
- RandomMac.sfs.gz
- fake .gz
- (240 KiB) Downloaded 96 times
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Hi stemsee,
I am getting different output with 32-bit puppy tests than your 64-bit in the window when program first starts & when making choices.
Testing in both bionic32 19.03 & precise 5.7.1
I have now updated precise 5.7.1 to Yad_0.4.0 which makes it the same as in bionic32, Yad_0.40.0 is working the same and gives me the same results in both precise & bionic 32-bit versions.
I have not tested the program in any 64-bit puppy as I don't have one of those installed.
The following pics are in sequence during one run of the program. This is in bionic32 19.03 using the preinstalled Yad_0.40.0
I am getting different output with 32-bit puppy tests than your 64-bit in the window when program first starts & when making choices.
Testing in both bionic32 19.03 & precise 5.7.1
I have now updated precise 5.7.1 to Yad_0.4.0 which makes it the same as in bionic32, Yad_0.40.0 is working the same and gives me the same results in both precise & bionic 32-bit versions.
I have not tested the program in any 64-bit puppy as I don't have one of those installed.
The following pics are in sequence during one run of the program. This is in bionic32 19.03 using the preinstalled Yad_0.40.0
- Attachments
-
- window1.jpg
- Program startup window, no input from user
- (16.31 KiB) Downloaded 116 times
-
- window1a.jpg
- Hilite the interface before mouse click changes "This Mac" box in window from "No iface Selected" to "wlan0 selected" This is only hiliting the interface and not mouse clicking, after mouse clicking is in next pic.
- (17.37 KiB) Downloaded 117 times
-
- window2.jpg
- After mouse click on "wlan0" interface choice
- (18.25 KiB) Downloaded 116 times
-
- window3.jpg
- After mouse click on "New Mac"
- (18.05 KiB) Downloaded 116 times
-
- window4.jpg
- After mouse click on "Original Mac"
- (17.07 KiB) Downloaded 117 times
Thanks perdido
I think I sorted out the problem this time.
I was sending an echo -e '\f' to blank the fields but it was doing that and adding a new line, so the fields got pushed round. Now i just echo "" 3 times, and hopefully has solved the issue.
stemsee
I think I sorted out the problem this time.
I was sending an echo -e '\f' to blank the fields but it was doing that and adding a new line, so the fields got pushed round. Now i just echo "" 3 times, and hopefully has solved the issue.
stemsee
- Attachments
-
- RandomMac.sfs.gz
- (240 KiB) Downloaded 82 times
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Hi stemsee,
Tested on 32-bit bionic & precise.
The pics are from precise 5.7.1 this time. Yad_0.40.0
One thing that changed is the newly renamed "Saved Mac" button is not doing anything now.
Easier to just post pics for comparison purposes to last batch.
Tested on 32-bit bionic & precise.
The pics are from precise 5.7.1 this time. Yad_0.40.0
One thing that changed is the newly renamed "Saved Mac" button is not doing anything now.
Easier to just post pics for comparison purposes to last batch.
- Attachments
-
- w-1_2020-01-03_215319.jpg
- Program startup window, no input from user
- (17.36 KiB) Downloaded 75 times
-
- w-2_2020-01-03_215401.jpg
- Hilite the interface before mouse click changes "This Mac" box in window from "No iface Selected" to "wlan0 selected" This is only hiliting the interface and not mouse clicking, after mouse clicking is in next pic.
- (18.06 KiB) Downloaded 75 times
-
- w-3_2020-01-03_215446.jpg
- After mouse click on "wlan0" interface choice
- (19.04 KiB) Downloaded 75 times
-
- w-4_2020-01-03_215512.jpg
- After mouse click on "New Mac"
- (19.64 KiB) Downloaded 75 times
-
- w-5_2020-01-03_215650.jpg
- After mouse click of "Saved mac"
- (19.68 KiB) Downloaded 76 times
So from your post I see that something does not behave the same on bionic/precise as it does on fatdog ... . I use yad version 42.
I will have to download bionic to test....when I have time.
This is the script I'm using right now.
I will have to download bionic to test....when I have time.
This is the script I'm using right now.
Code: Select all
#!/bin/sh
# by stemsee (C) 2019
[[ $(whoami) != "root" ]] && exec sudo -A ${0} ${@}
export PROG=$(basename $0)
running=$(ps -e | grep -w "$PROG" | wc -l)
[[ "$running" -gt 2 ]] && exit # run only one instance
export track=/tmp/rmac
[[ -d $track ]] && rm -rf $track
mkdir -p $track
mkfifo $track/rmp
exec 1<> $track/rmp
export hwether=$(ifconfig $int | grep -e 'ether' | awk '{print $2}')
echo "hwether=$hwether" > $HOME/.hweth
function restore (){
[[ -f "$track"/int ]] && int="$(cat $track/int)"
[[ -f $HOME/.hweth ]] && . $HOME/.hweth
ifconfig $int down
ifconfig $int hw ether $hwether
ifconfig $int up
echo ""
echo ""
echo ""
echo "$hwether"
echo "$hwether"
[[ ! -z $int ]] && echo "$int selected" || echo "NO iface Selected"
}; export -f restore
function ranmacfn (){ #code found on net, set random mac
hwether=$(ifconfig $int | grep -e 'ether' | awk '{print $2}')
echo "hwether=$hwether" > "$track"/hwethRM
[[ -f "$track"/int ]] && int="$(cat $track/int)"
OUI="/usr/sbin/RanMacList"
OUI_LEN=24931
R=$(((RANDOM % ${OUI_LEN})+1))
PREFIX=$(head -$R $OUI | tail -1)
CMD="ifconfig ${int} hw ether ${PREFIX}:"
for i in $(seq 1 6); do
R=$(((RANDOM % 15)+1))
C=$(echo "obase=16; $R" | bc)
CMD="${CMD}${C}"
if [ $((i % 2)) = 0 ] && [ $i != 6 ]; then
CMD="$CMD:"
fi
done
RESULT=$($CMD)
export CMD=$(echo $CMD | cut -f5 -d' ')
echo "hwether=$CMD" > "$track"/hwethRM
ifconfig $int down
echo ""
echo ""
echo ""
echo "$hwether"
echo "$CMD"
[[ ! -z $int ]] && echo "$int selected" || echo "NO iface Selected"
}; export -f ranmacfn
function showfn (){
[[ -f "$track"/int ]] && int="$(cat $track/int)"
echo ""
echo ""
echo ""
echo "$hwether"
echo "$CMD"
[[ ! -z $int ]] && echo "$int selected" || echo "NO iface Selected"
}; export -f showfn
function on_exit (){
rm -rf $track
}; export -f on_exit
trap 'bash -c on_exit' EXIT
yad --plug=$$ --tabnum=1 --item-separator='\n' --list --column="Interface" $(ls /sys/class/net | grep -v 'lo') \
--select-action="bash -c 'printf "%s" > $track/int; bash -c showfn > $track/rmp'" --dclick-action="bash -c ranmacfn" &
yad --plug=$$ --tabnum=2 \
--form --cycle-read --field="Previous Mac:RO" --field="This Mac:RO" --field="Selected Interface:RO" <&1 &
bash -c showfn
yad --paned --splitter="-140" --height="200" --key=$$ --orient=vert --tab=iface --tab=MAc --title=" Random Mac Generator" \
--window-icon="/usr/share/pixmaps/configure.png" --button="New Mac:bash -c ranmacfn > $track/rmp" \
--button="Saved Mac:bash -c 'restore > $track/rmp'" --button="gtk-cancel:1"
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Hi stemsee,stemsee wrote:So from your post I see that something does not behave the same on bionic/precise as it does on fatdog ... . I use yad version 42.
I will try and find a 32-bit yad 42 to upgrade with, might make a difference.
I satrted with yad 33 in precise and that worked when manually choosing interface but failed when the mouse-click method was implemented. Upgrading to yad 40 fixed that so maybe upgrading again could be the solution.
Will report back on this if I test with yad 42.
Thanks for building this utility!
.
The problem is the ifconfig behaves differently.
try this
try this
Code: Select all
#!/bin/sh
# by stemsee (C) 2019
#
[[ $(whoami) != "root" ]] && exec sudo -A ${0} ${@}
export PROG=$(basename $0)
running=$(ps -e | grep -w "$PROG" | wc -l)
[[ "$running" -gt 2 ]] && exit # run only one instance
export track=/tmp/rmac
[[ -d $track ]] && rm -rf $track
mkdir -p $track
mkfifo $track/rmp
exec 1<> $track/rmp
export OS=$(uname -a | awk '{print $2}')
case $OS in
fatdog*|Fatdog*|fd64*|FD64*) export hwether=$(ifconfig $int | grep -e 'ether' | awk '{print $2}');;
*) export hwether=$(ifconfig $int | grep -e 'HWaddr' | awk '{print $5}');;
esac
echo "hwether=$hwether" > $track/hweth
function restore (){
[[ -f "$track"/int ]] && int="$(cat $track/int)"
[[ -f $track/hweth ]] && . $track/hweth
ifconfig $int down
ifconfig $int hw ether $hwether
ifconfig $int up
echo -e '\f'
echo -e '\f'
echo ""
echo "$hwether"
echo "$hwether"
[[ ! -z $int ]] && echo "$int selected" || echo "NO iface Selected"
}; export -f restore
function ranmacfn (){ #code found on net, set random mac
case $OS in
fatdog*|Fatdog*|fd64*|FD64*) export hwether=$(ifconfig $int | grep -e 'ether' | awk '{print $2}');;
*) export hwether=$(ifconfig $int | grep -e 'HWaddr' | awk '{print $5}');;
esac
echo "hwether=$hwether" > "$track"/hwethRM
[[ -f "$track"/int ]] && int="$(cat $track/int)"
OUI="/usr/sbin/RanMacList"
OUI_LEN=24931
R=$(((RANDOM % ${OUI_LEN})+1))
PREFIX=$(head -$R $OUI | tail -1)
CMD="ifconfig ${int} hw ether ${PREFIX}:"
for i in $(seq 1 6); do
R=$(((RANDOM % 15)+1))
C=$(echo "obase=16; $R" | bc)
CMD="${CMD}${C}"
if [ $((i % 2)) = 0 ] && [ $i != 6 ]; then
CMD="$CMD:"
fi
done
RESULT=$($CMD)
export CMD=$(echo $CMD | cut -f5 -d' ')
ifconfig $int down
ifconfig $int hw ether $CMD
ifconfig $int up
echo -e '\f'
echo -e '\f'
echo "$hwether"
echo "$CMD"
[[ ! -z $int ]] && echo "$int selected" || echo "NO iface Selected"
}; export -f ranmacfn
function showfn (){
[[ -f "$track"/int ]] && int="$(cat $track/int)"
echo -e '\f'
echo -e '\f'
echo "$hwether"
echo "$CMD"
[[ ! -z $int ]] && echo "$int selected" || echo "NO iface Selected"
}; export -f showfn
function on_exit (){
rm -rf $track
}; export -f on_exit
trap 'bash -c on_exit' EXIT
yad --plug=$$ --tabnum=1 --item-separator='\n' --list --column="Interface" $(ls /sys/class/net | grep -v 'lo') \
--select-action="bash -c 'printf "%s" > $track/int; bash -c showfn > $track/rmp'" --dclick-action="bash -c ranmacfn" &
yad --plug=$$ --tabnum=2 \
--form --cycle-read --field="Selected Interface:RO" --field="Start Mac:RO" --field="This Mac:RO" <&1 &
bash -c showfn
yad --paned --splitter="-140" --height="200" --key=$$ --orient=vert --tab=iface --tab=MAc --title=" Random Mac Generator" \
--window-icon="/usr/share/pixmaps/configure.png" --button="New Mac:bash -c ranmacfn > $track/rmp" \
--button="Saved Mac:bash -c 'restore > $track/rmp'" --button="gtk-cancel:1"
- perdido
- Posts: 1528
- Joined: Mon 09 Dec 2013, 16:29
- Location: ¿Altair IV , Just north of Eeyore Junction.?
Hi stemsee,
Tested in bionic32 18.05 & precise 5.7.1 using yad 40
Latest script output using 32-bit precise in pics
Tested in bionic32 18.05 & precise 5.7.1 using yad 40
Latest script output using 32-bit precise in pics
- Attachments
-
- mac1_2020-01-05_003728.jpg
- Start-up window, no user input yet
- (19.3 KiB) Downloaded 82 times
-
- mac2_2020-01-05_003825.jpg
- Hilite "Interface" choice
- (19.13 KiB) Downloaded 82 times
-
- mac3_2020-01-05_004032.jpg
- After double mouse click "Interface" choice
- (20.13 KiB) Downloaded 82 times
-
- mac4_2020-01-05_004301.jpg
- After mouse click on "New Mac" button
- (20.67 KiB) Downloaded 82 times
-
- mac5_2020-01-05_004322.jpg
- After mouse click on "Saved Mac" button
- (20.68 KiB) Downloaded 79 times