Jump to content

Wps Button - Random Mac Address & Ssid


Recommended Posts

Just a little script to change the SSID and MAC address of the device (to make it look like a new AP on demand) at a push of a button ;)

Either paste it into the WebUI or

scp wpsScript.sh root@<ip>:/www/pineapple/config/wpsScript.sh[/CODE]

Tested on Firmware v2.2

[i]p.s. I've also got got the random MAC address part in the start up script (/etc/rc.local) :) [/i]

[CODE]
#!/bin/sh
# This user script is provided for custom actions and can be added to crontab or run directly from the advanced page by entering "/www/pineapple/scripts/user.sh" and pressing "Execute Commands"

#New SSID####################################################################
# Generates a random number
rand=`head /dev/urandom | tr -dc "123456" | head -c1` # echo $(awk 'BEGIN{srand();print int(rand()*5)}')

# Pre-defined SSIDs & chooses one at random
ssid=`echo "linksys NETGEAR BTHomeHub-1337 BTHomeHub2-1337 virginmedia1337XYZ SKY31337" | awk -v x=$rand '{print $x}'`

# Feed back to the user (un-needed - just handy for debugging)
echo "Now changing SSID to: $ssid"

# Persistent WiFi SSID
#echo $(sed 's/option ssid.*/option ssid "$ssid"/g' /etc/config/wireless) > /etc/config/wireless

# Changes current SSID to match
hostapd_cli -p /var/run/hostapd-phy0 karma_change_ssid "$ssid"
#############################################################################

#New MAC Address#############################################################
# Changes MAC address of all the adapters
for interface in `cat /proc/net/dev | grep ':' | cut -d ':' -f 1 | tr -d ' '`; do #for interface in br-lan eth0 eth1 wlan0 mon.wlan0; do
echo "Changing $interface's MAC address" # Feedback to user (un-needed - just handy for debugging)
ifconfig $interface down # Brings down the interface
macchanger -r $interface # Gives a completely random MAC Address
ifconfig $interface up # Restores Interface
echo "----------------------------------------" # "Prettiness" (un-needed - just handy for debugging)
done
#############################################################################
[/CODE]

Edited by g0tmi1k
Link to post
Share on other sites
  • 1 month later...

Seb is the list of features requested and what will make it in the next release published somewhere?

I guess what I'm asking for is there a release plan documented of the features to add in each release of the firmware?

2.5.0

feature a

feature b

feature c

...

feature n

2.5.1

feature x

feature y

etc.

Link to post
Share on other sites

Seb is the list of features requested and what will make it in the next release published somewhere?

I guess what I'm asking for is there a release plan documented of the features to add in each release of the firmware?

2.5.0

feature a

feature b

feature c

...

feature n

2.5.1

feature x

feature y

etc.

Yes. In my head..

But no, there is a kind of list but it is not public.

The reason why I haven't published my full todo list is because it adds more time pressure.

However, a release plan may be a good idea. We have some cool stuff coming. I'll write one up later today.

Best Regards,

Sebkinne

Link to post
Share on other sites
  • 4 weeks later...

Hey,

Just something I have experienced; It worked, though now I am locked out. What I did was paste the macchanger script into rc.local, before exit0 (with the comments out of it...). The mac has indeed changed, by looking at airodump.

The thing is I was unable to get an IP of it, so I thought of the reset button.

Now the wifi pineapple's SSID is pineapple xx:xx (last 4 of the mac adress), though the mac adress still is not the original.

Using firmware 2.5.0.

Thanks in advance,

Vlek007.

Link to post
Share on other sites
  • 3 weeks later...

I have it working - will be in the next version.

any update on this? after reading everything on these forums i haven't found anything that allows for macchanger + karma to work properly. after running "wifi" command mac goes back to the original address. did i miss something?

commented out "option macaddr ..." in /etc/config/wireless

ifconfig wlan0 down

macchanger -r wlan0

ifconfig wlan0 up

(launching karma here doesn't work)

wifi

(resets mac address, but karma works)

trying to get around some wids/wips alarms, thanks.

Link to post
Share on other sites

any update on this? after reading everything on these forums i haven't found anything that allows for macchanger + karma to work properly. after running "wifi" command mac goes back to the original address. did i miss something?

commented out "option macaddr ..." in /etc/config/wireless

ifconfig wlan0 down

macchanger -r wlan0

ifconfig wlan0 up

(launching karma here doesn't work)

wifi

(resets mac address, but karma works)

trying to get around some wids/wips alarms, thanks.

Yes, thanks for the reminder. I need to add that in. It will not hit the next stable release but the one shortly after.

Best Regards,

Sebkinne

Link to post
Share on other sites

Yes, thanks for the reminder. I need to add that in. It will not hit the next stable release but the one shortly after.

Best Regards,

Sebkinne

any chance you can offer a hint of where to look so i can try beating that time table?

thank you for the super fast response!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...