g0tmi1k Posted June 10, 2012 Share Posted June 10, 2012 (edited) 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 numberrand=`head /dev/urandom | tr -dc "123456" | head -c1` # echo $(awk 'BEGIN{srand();print int(rand()*5)}')# Pre-defined SSIDs & chooses one at randomssid=`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 matchhostapd_cli -p /var/run/hostapd-phy0 karma_change_ssid "$ssid"##############################################################################New MAC Address############################################################## Changes MAC address of all the adaptersfor 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 June 10, 2012 by g0tmi1k Quote Link to comment Share on other sites More sharing options...
PineDominator Posted June 10, 2012 Share Posted June 10, 2012 wow cool, does changing the mac really work? because it didn't in the past. would cause karma to not work or would go back to the original mac. Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted June 10, 2012 Share Posted June 10, 2012 wow cool, does changing the mac really work? because it didn't in the past. would cause karma to not work or would go back to the original mac. I have it working - will be in the next version. Quote Link to comment Share on other sites More sharing options...
PineDominator Posted June 10, 2012 Share Posted June 10, 2012 I have it working - will be in the next version. :-D Quote Link to comment Share on other sites More sharing options...
some1 Posted August 6, 2012 Share Posted August 6, 2012 I have it working - will be in the next version. Where is it? I have 2.5.0 and I dont see it. Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted August 6, 2012 Share Posted August 6, 2012 Where is it? I have 2.5.0 and I dont see it. Yeah, sorry about that. We do have a huge backlog of features that are waiting to be put in. This is definitely on the list. Quote Link to comment Share on other sites More sharing options...
dustbyter Posted August 6, 2012 Share Posted August 6, 2012 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. Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted August 6, 2012 Share Posted August 6, 2012 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 Quote Link to comment Share on other sites More sharing options...
some1 Posted August 7, 2012 Share Posted August 7, 2012 Yeah, sorry about that. We do have a huge backlog of features that are waiting to be put in. This is definitely on the list. thx u Quote Link to comment Share on other sites More sharing options...
Technoprenerd Posted August 30, 2012 Share Posted August 30, 2012 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. Quote Link to comment Share on other sites More sharing options...
poncho Posted September 17, 2012 Share Posted September 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Sebkinne Posted September 17, 2012 Share Posted September 17, 2012 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 Quote Link to comment Share on other sites More sharing options...
poncho Posted September 17, 2012 Share Posted September 17, 2012 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.