Jump to content

Wifi Pinapple Computer!


chiwill

Recommended Posts

I made this program that makes your computer act as a wifi Pineapple.

For wifi to wifi.

#!/bin/bash

airmon-ng stop mon0

airmon-ng start wlan0

airbase-ng -e "TEST" -c 9 mon0 &

ifconfig at0 up

ifconfig at0 192.168.2.129 netmask 255.255.255.128

route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0


iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&

iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE &&

iptables --append FORWARD --in-interface at0 -j ACCEPT &&

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

It works but It is set to use Wlan0 as both in and out interfaces because I only have one wifi card.

From ethernet to wifi.

#!/bin/bash

airmon-ng stop mon0

airmon-ng start wlan0
airbase-ng -e "TEST" -c 9 mon0 &

ifconfig at0 up

ifconfig at0 192.168.2.129 netmask 255.255.255.128
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0



iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE &&

iptables --append FORWARD --in-interface at0 -j ACCEPT &&

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

From wifi to ethernet.

#!/bin/bash
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0



iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&

iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE &&

iptables --append FORWARD --in-interface eth0 -j ACCEPT &&

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

Thats All of them!

Edited by chiwill
Link to comment
Share on other sites

I made this program that makes your computer act as a wifi Pineapple.

For wifi to wifi.

#!/bin/bash

airmon-ng stop mon0

airmon-ng start wlan0

airbase-ng -e "TEST" -c 9 mon0 &

ifconfig at0 up

ifconfig at0 192.168.2.129 netmask 255.255.255.128

route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0


iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&

iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE &&

iptables --append FORWARD --in-interface at0 -j ACCEPT &&

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

It works but It is set to use Wlan0 as both in and out interfaces because I only have one wifi card.

From ethernet to wifi.

#!/bin/bash

airmon-ng stop mon0

airmon-ng start wlan0
airbase-ng -e "TEST" -c 9 mon0 &

ifconfig at0 up

ifconfig at0 192.168.2.129 netmask 255.255.255.128
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0



iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE &&

iptables --append FORWARD --in-interface at0 -j ACCEPT &&

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

From wifi to ethernet.

#!/bin/bash
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0



iptables --flush && iptables --table nat --flush && iptables --delete-chain && iptables --table nat --delete-chain &&

iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE &&

iptables --append FORWARD --in-interface eth0 -j ACCEPT &&

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

Thats All of them!

Nice Share! Thanks!

Link to comment
Share on other sites

I was wondering if, just to make your post more like a dev post if you could add more details about what functionality of the pineapple you were bringing to the table. The Yasager portion? Just sharing out your internet as a wifi access-point named whatever you choose? etc. If you were into it you could also jump on something like github and then add to this seemingly great potential project. Good Luck either way! And Thanks!

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.

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