Jump to content

wp7.sh typo


PoSHMagiC0de

Recommended Posts

Hey, posted this on Discord but the wp7.sh script has a couple of typos.

At the top here are the variables it is using.

wpver=7.0
spineapplenmask=255.255.255.0
spineapplenet=172.16.42.0/24
spineapplelan=eth1
spineapplewan=wlan0
spineapplegw=192.168.1.1
spineapplehostip=172.16.42.42
spineappleip=172.16.42.1
sfirsttime=1

But under the connect function the pineapple netmask variable is missing the "s".

 

function connectsaved {
    if [[ "$sfirsttime" == "1" ]]; then
        printf "\n    Error: Settings unsaved. Run either Guided or Manual setup first.\n"; menu
    fi
    ip addr add $spineapplehostip/$pineapplenmask dev $spineapplelan               <=======used pineapplenmask instead of spineapplenmask
    ip link set $spineapplelan up
    printf "Detecting WiFi Pineapple..."
    until ping $spineappleip -c1 -w1 >/dev/null
    do
        printf "."
    	ip link set $spineapplelan up
        sleep 1
    done
    printf "...found.\n\n"
    printf "    $(tput setaf 6)     _ .   $(tput sgr0)        $(tput setaf 7)___$(tput sgr0)          $(tput setaf 3)\||/$(tput sgr0)\n"
    printf "    $(tput setaf 6)   (  _ )_ $(tput sgr0) $(tput setaf 2)<-->$(tput sgr0)  $(tput setaf 7)[___]$(tput sgr0)  $(tput setaf 2)<-->$(tput sgr0)  $(tput setaf 3),<><>,$(tput sgr0)\n"
    printf "    $(tput setaf 6) (_  _(_ ,)$(tput sgr0)       $(tput setaf 7)\___\\$(tput sgr0)        $(tput setaf 3)'<><>'$(tput sgr0)\n"
    ip addr add $spineapplehostip/$pineapplenmask dev $spineapplelan                    <=====used pineapplenmask instead of spineapplenmask
    ip link set $spineapplelan up
    echo '1' > /proc/sys/net/ipv4/ip_forward # Enable IP Forwarding
    iptables -X #clear chains and rules
    iptables -F
    iptables -A FORWARD -i $spineapplewan -o $spineapplelan -s $spineapplenet -m state --state NEW -j ACCEPT #setup IP forwarding
    iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -A POSTROUTING -t nat -j MASQUERADE
    ip route del default #remove default route
    ip route add default via $spineapplegw dev $spineapplewan #add default gateway
    printf "\n    Browse to http://$spineappleip:1471\n\n"
    exit
}

I put arrows...which are hard to see but there are at the two lines that near "ip addr add".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...