Jump to content

Wifi Pinapple Diy ?

Recommended Posts

If you have a Fon 2100, 2200 or an open-mesh mini the Mark II can easily be flashed using any of the MK2 guides posted here. If you have an ALFA AP51 you can download the latest backfire source, karma patches, MK3 interface source, configuration files and packages all linked from wifipineapple.com. Just flash the latest build, patch karma, install the listed packages and copy over /www and /etc from the archive.

A few notes on the MK3 and the interface:

You'll need to cron the below script every 4 minutes or at least while true; do /etc/heartbeat.sh;uptime;sleep 180; done

echo "#!/bin/sh

gpioctl dirout 3

gpioctl clear 3

gpioctl set 3" > /etc/heartbeat.sh

chmod +x /etc/heartbeat.sh

Add it to cron with

echo "*/3 * * * * /etc/heartbeat.sh" >> /etc/crontabs/root

Setup links to dhcp and arp and ngrep

ln -s /proc/net/arp /www/pineapple/arp

ln -s /tmp/dhcp.leases /www/pineapple/dhcp

ln -s /tmp/ngrep.log /www/pineapple/ngrep.log

also after installing "at" you need to create an atd link in rc.d

ln -s /etc/init.d/atd /etc/rc.d/S50atd

After installing PHP fix the config with

sed -i 's,doc_root.*,doc_root = "",g' /etc/php.ini */

sed -i 's,;short_open_tag = Off,short_open_tag = On,g' /etc/php.ini

Then setup uhttpd to use php files by adding the following to /etc/config/uhttpd

list interpreter ".php=/usr/bin/php"

option 'index_page' 'index.php'

*for some reason the single quotes are vital here

The important bits for ICS to work are in /etc/config/dhcp

list 'dhcp_option' '3,<ip of computer>'

list 'dhcp_option' '6,<ip of pineapple>,'#this is google's dns server

list 'dhcp_option' '6,<ip of pineapple>,<second dns server>'

and /etc/config/network

option 'ipaddr' '<ip of pineapple>'

option 'gateway' '<ip of computer>'

option 'netmask' ''

option 'dns' '' #or your dns provider of choice

Then on your computer setup iptables with:



pineapplewan=wlan0 #wlan0 for wifi, ppp0 for 3g

pineapplegw=`netstat -nr | awk 'BEGIN {while ($3!="") getline; print $2}'`

#bring up interface and start pinging pineapple

ifconfig eth2 netmask up; ping

#enable IP forwarding

echo '1' > /proc/sys/net/ipv4/ip_forward

#clear chains and rules

iptables -X

iptables -F

#setup IP forwarding

iptables -A FORWARD -i $pineapplewan -o $pineapplelan -s $pineapplenet -m state --state NEW -j ACCEPT

iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A POSTROUTING -t nat -j MASQUERADE

#remove default route

route del default

#add default gateway

route add default gw $pineapplegw $pineapplewan

and finally on the router issue route add default gw br-lan

I just updated the wiki with links to all the goodies you'll need.

Link to comment
Share on other sites

Since i spent 3 days working on my OMP1 reboot issue im still kinda fond of the script and crontab i came up with:

//create script

touch /sbin/heartbeat.sh

//add code to script

vi /sbin/heartbeat.sh


gpioctl dirout 3

gpioctl clear 3

sleep 0

gpioctl set 3



chmod +x /sbin/heartbeat.sh

//add crontab

crontab -e

1-59/1 * * * * /sbin/heartbeat.sh



//verify new crontab

crontab - l

and poof it will stop rebooting every 5 min, worked on this with open mesh support staff

Edited by Ghostshell
Link to comment
Share on other sites

my minions are almost ready to take over my neighborhood, the pineapple army is almost ready

nice, im waiting for a USB to TTL cable that i orderet... dont want to mod the one i have made for my old FON, might still need it at some point :D

cant wait :D

Link to comment
Share on other sites

build, you will find dsniff under rc3 and rc4 packages, i used rc4 but working on a new mk3 with rc6

Have you found out how to get jasager running?

i get this when trying to install the patched files from digininja

root@Pineapple:/tmp# opkg install *.ipk

Package kmod-madwifi ( installed in root is up to date.

Unknown package 'jasager'.

Collected errors:

* pkg_hash_fetch_best_installation_candidate: Packages for jasager found, but incompatible with the architectures configured

* opkg_install_cmd: Cannot install package jasager.

Edited by httpCRASH
Link to comment
Share on other sites

anyone els having space problems when adding phising sites?

the install and *.ipk install uses so much space, that i have very little space left for phising files, witch i find a bit weird.

When i look at my old fon2100 installed with the new firmware from sebkinne

there is allot of free space

i also still need to find out how to patch hostapd with digininjas patch... but rome wasnt build in a day :rolleyes:

Link to comment
Share on other sites

@httpCRASH, Space problems I think I fixed in the firmware. The firmware I put up includes all the things you need, you do not have to patch hostapd.



hmm, but your firmware is for MK1 and MK2 rigth?

when im flashing my AP51 i only got it working with the openwrt-atheros-vmlinux.gz file, and NOT openwrt-atheros-vmlinux.lzma

so my guess is that i need the .gz file from the openwrt version you use to get your version working on my DIY MK3?? :)

EDIT: have just tried with both your files, and with switching out the lzma file with the gz file from http://downloads.openwrt.org/snapshots/trunk/atheros/ (guessed that you used this version?)

both attemps failed.. i get ping on, but cant connect to ssh or web...

Edited by httpCRASH
Link to comment
Share on other sites

The build I worked off was Bleeding Edge 27575 and the packages were sourced from rc3 and rc4. I haven't played with rc6 yet.

RC6 is good, i got a 2100, 2201, OMP1, and 3201A all manually built off your post with MK3 running and working, have all 4 placed is hidden areas in my apts, the girls in the apt office let me get away with and do too much!

Link to comment
Share on other sites

Hi I would love to buy the wifipineapple, but thats too much money for me.

I got a fon 2202 to learn with openwrt, but I wonder if it would be possible to install mark III onto it. Can I just flash the compiled Mark III Firmware with the fonflash utility from gargoyle?

Link to comment
Share on other sites

  • 2 weeks later...

Maybe a stupid question, but I got an Alfa AP51, and have done everything. But I can't understand how to get the patched Karma on it. Or is it the hostapd?

Can anyone please tell me wich packet to use and how to make it work? =)


Link to comment
Share on other sites

check 6 posts above yours. sebkinne mentioned that nothing else is required if you flash the AP51 with his firmware. You'll have all the latest and greatest with no extra work. BTW thanks a million sebkinne -- awesome work!

And Ghostshell for the directions:




Maybe a stupid question, but I got an Alfa AP51, and have done everything. But I can't understand how to get the patched Karma on it. Or is it the hostapd?

Can anyone please tell me wich packet to use and how to make it work? =)


Edited by diggler
Link to comment
Share on other sites

For what it's worth, I grabbed 2 more AP51's from an AZ distributor (listed in another thread).

With Seb's firmware package, the FreiFunk flash util (check Mr. Protocol's sigline!), and help from Ghost's install guide, I just flashed 2 units straight out of the box in like 5 minutes total.

Tested, they work perfectly!!

I bought my first MK3 from Hakshop though, GOTTA show 'em some love over there!! :) :) :)

Thanks to everyone for the expert help and the outstanding community feel out here, awesome group of folks out here!

Edited by hfam
Link to comment
Share on other sites

Can this sucker be powered by USB? Adapter is 12v, batter pack is 6v, and usb is 5v? Can this thing be powered off of USB somehow or is there just not enough power? How much power does the AP51 actually draw?

Darren stated somewhere on the forums that it does work off battery and USB. I would almost assume it would work at a lower transmit range, but I always run mine from outlet power.

Link to comment
Share on other sites

Yeah, Im not saying his firmware is bad or something. Thats really great, but I want to try learning a little bit as well in the process =)

All we are saying is that we have modified the patch and many many other things. If you want those you will have to get the firmware.

Link to comment
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.

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...