Skip to content

Commit ded0277

Browse files
committed
First 2.8.0 commit
0 parents  commit ded0277

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+3462
-0
lines changed

3g/3g-keepalive.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
# --------------------------------------------------------------
3+
# Check if 3G / WAN connection is online and bring it up if not.
4+
# --------------------------------------------------------------
5+
6+
SERVER="8.8.8.8" # This is Google's DNS server - if it's down we've got bigger problems
7+
logger "3G: Keep-Alive Script Executed"
8+
9+
if ! ( ifconfig 3g-wan2); then
10+
logger "3G: Interface 3g-wan2 seems down. Attempting 3g connect script again"
11+
/pineapple/3g/3g.sh
12+
else
13+
logger "3G: Interface 3g-wan2 seems up"
14+
15+
if ! ( ping -q -c 1 -W 10 $SERVER > /dev/null || ping -q -c 1 -W 10 $SERVER > /dev/null || ping -q -c 1 -W 10 $SERVER > /dev/null ); then
16+
logger "3G: Interface 3g-wan2 up however Internet connection seemed to have been down. Hello, IT. Is the modem activated? Have you tried turning it off and on again?"
17+
logger "3G: Attempting ifup wan2. Hopefully that solves the problem."
18+
ifup wan2
19+
20+
else
21+
logger "3G: Interface 3g-wan2 up and Internet Connection seems to be up. woot"
22+
fi
23+
fi

3g/3g.sh

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
#!/bin/sh
2+
# ---------------------------------------------------------
3+
# 3G Connection Script for WiFi Pineapple. "Does the thing"
4+
#
5+
# Version: 2012-02-17
6+
# Supports:
7+
#
8+
# ZTE MF591 (T-Mobile) -dkitchen
9+
# Novatel MC760 (Virgin) -dkitchen
10+
# Novatel MC760 (Ting) -dkitchen
11+
# Sierra 598u (Ting) -brianzimm
12+
# And more.
13+
#
14+
# Updates: wifipineapple.com
15+
# ---------------------------------------------------------
16+
17+
18+
# -----------------------------------------------------------
19+
# Configure /etc/ppp/options with hard-coded working settings
20+
# -----------------------------------------------------------
21+
echo "
22+
logfile /dev/null
23+
noaccomp
24+
nopcomp
25+
nocrtscts
26+
lock
27+
maxfail 0" > /etc/ppp/options
28+
29+
# --------------------------------------------------------------------------------------------------
30+
# Check for known usb modem vendor and product IDs then switch 'em from storage to serial modem mode
31+
# --------------------------------------------------------------------------------------------------
32+
echo "Searching for attached 3G Modems"
33+
logger "3G: Connection Script here, searching for modems"
34+
MODEM=$(lsusb | awk '{ print $6 }')
35+
echo $MODEM
36+
37+
case "$MODEM" in
38+
39+
*19d2:1523*) echo "ZTE MF591 (T-Mobile) detected. Attempting mode switch"
40+
uci delete network.wan2
41+
uci set network.wan2=interface
42+
uci set network.wan2.ifname=ppp0
43+
uci set network.wan2.proto=3g
44+
uci set network.wan2.service=umts
45+
uci set network.wan2.device=/dev/ttyUSB0
46+
uci set network.wan2.apn=epc.tmobile.com
47+
uci set network.wan2.username=internet
48+
uci set network.wan2.password=internet
49+
uci set network.wan2.defaultroute=1
50+
uci commit network
51+
usb_modeswitch -v 19d2 -p 1523 -V 19d2 -P 1525 -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20
52+
sleep 10; rmmod usbserial
53+
sleep 3; insmod usbserial vendor=0x19d2 product=0x1525
54+
sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
55+
logger "3G: firewall stopped"
56+
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
57+
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
58+
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
59+
60+
;;
61+
*1410:6002* | *1410:5031*) echo "Novatel MC760 (Virgin Mobile) detected. Attempting mode switch"
62+
uci delete network.wan2
63+
uci set network.wan2=interface
64+
uci set network.wan2.ifname=ppp0
65+
uci set network.wan2.proto=3g
66+
uci set network.wan2.service=cdma
67+
uci set network.wan2.device=/dev/ttyUSB0
68+
uci set network.wan2.username=internet
69+
uci set network.wan2.password=internet
70+
uci set network.wan2.defaultroute=1
71+
uci set network.wan2.ppp_redial=persist
72+
uci set network.wan2.peerdns=0
73+
uci set network.wan2.dns=8.8.8.8
74+
uci set network.wan2.keepalive=1
75+
uci set network.wan2.pppd_options=debug
76+
uci set network.wan2.pppd_options=noauth
77+
uci commit network
78+
usb_modeswitch -v 1410 -p 5031 -V 1410 -P 6002 -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20
79+
sleep 10; rmmod usbserial
80+
sleep 3; insmod usbserial vendor=0x1410 product=0x6002
81+
sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
82+
logger "3G: firewall stopped"
83+
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
84+
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
85+
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
86+
87+
;;
88+
*1410:5030*) echo "Novatel MC760 (Ting) detected. Attempting mode switch"
89+
uci delete network.wan2
90+
uci set network.wan2=interface
91+
uci set network.wan2.ifname=ppp0
92+
uci set network.wan2.proto=3g
93+
uci set network.wan2.service=cdma
94+
uci set network.wan2.device=/dev/ttyUSB0
95+
uci set network.wan2.username=internet
96+
uci set network.wan2.password=internet
97+
uci set network.wan2.defaultroute=1
98+
uci set network.wan2.ppp_redial=persist
99+
uci set network.wan2.peerdns=0
100+
uci set network.wan2.dns=8.8.8.8
101+
uci set network.wan2.keepalive=1
102+
uci set network.wan2.pppd_options=debug
103+
uci set network.wan2.pppd_options=noauth
104+
uci commit network
105+
usb_modeswitch -v 1410 -p 5030 -V 1410 -P 6000 -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20
106+
sleep 10; rmmod usbserial
107+
sleep 3; insmod usbserial vendor=0x1410 product=0x6000
108+
sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
109+
logger "3G: firewall stopped"
110+
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
111+
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
112+
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
113+
114+
;;
115+
*1199:0025*) echo "Sierra 598u (Ting) detected. Attempting mode switch"
116+
uci delete network.wan2
117+
uci set network.wan2=interface
118+
uci set network.wan2.ifname=ppp0
119+
uci set network.wan2.proto=3g
120+
uci set network.wan2.service=cdma
121+
uci set network.wan2.device=/dev/ttyUSB0
122+
uci set network.wan2.username=internet
123+
uci set network.wan2.password=internet
124+
uci set network.wan2.defaultroute=1
125+
uci set network.wan2.ppp_redial=persist
126+
uci set network.wan2.peerdns=0
127+
uci set network.wan2.dns=8.8.8.8
128+
uci set network.wan2.keepalive=1
129+
uci set network.wan2.pppd_options=debug
130+
uci set network.wan2.pppd_options=noauth
131+
uci commit network
132+
usb_modeswitch -v 1199 -p 0025
133+
sleep 10; rmmod usbserial
134+
sleep 3; insmod usbserial vendor=0x1199 product=0x0025
135+
sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
136+
logger "3G: firewall stopped"
137+
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
138+
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
139+
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
140+
141+
;;
142+
*12d1:1436*) echo "Huawei E173 detected. Attempting mode switch"
143+
uci delete network.wan2
144+
uci set network.wan2=interface
145+
uci set network.wan2.ifname=ppp0
146+
uci set network.wan2.proto=3g
147+
uci set network.wan2.service=umts
148+
uci set network.wan2.device=/dev/ttyUSB0
149+
uci set network.wan2.apn=apn
150+
uci set network.wan2.username=username
151+
uci set network.wan2.password=password
152+
uci set network.wan2.defaultroute=1
153+
uci commit network
154+
usb_modeswitch -v 12d1 -p 1436
155+
sleep 10; rmmod usbserial
156+
sleep 3; insmod usbserial vendor=0x12d1 product=0x1436
157+
sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
158+
logger "3G: firewall stopped"
159+
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
160+
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
161+
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
162+
163+
;;
164+
*12d1:140c*) echo "Huawei Modem (3-IRL) detected. Attempting mode switch"
165+
uci delete network.wan2
166+
uci set network.wan2=interface
167+
uci set network.wan2.ifname=ppp0
168+
uci set network.wan2.proto=3g
169+
uci set network.wan2.service=umts
170+
uci set network.wan2.device=/dev/ttyUSB0
171+
uci set network.wan2.apn=3internet
172+
uci set network.wan2.username=
173+
uci set network.wan2.password=
174+
uci set network.wan2.defaultroute=1
175+
uci commit network
176+
usb_modeswitch -v 12d1 -p 140c -V 12d1 -P 140c -M 5553424312345678000000000000061b000000020000000000000000000000 -n 1 -s 20
177+
sleep 10; rmmod usbserial
178+
sleep 3; insmod usbserial vendor=0x12d1 product=0x140c
179+
sleep 5; /etc/init.d/firewall disable; /etc/init.d/firewall stop
180+
logger "3G: firewall stopped"
181+
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o 3g-wan2 -j MASQUERADE
182+
iptables -A FORWARD -s 172.16.42.0/24 -o 3g-wan2 -j ACCEPT
183+
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i 3g-wan2 -j ACCEPT
184+
185+
;;
186+
esac

advanced/changePass

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
empty -f -i input.fifo -o output.fifo -p empty.pid passwd
3+
empty -w -i output.fifo -o input.fifo password: "$1\n"
4+
empty -w -i output.fifo -o input.fifo password: "$1\n"

advanced/ping.php

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<html>
2+
<head>
3+
<title>Pineapple Control Center</title>
4+
<script type="text/javascript" src="jquery.min.js"></script>
5+
</head>
6+
<body bgcolor="black" text="white" alink="green" vlink="green" link="green">
7+
8+
<?php require('../includes/navbar.php'); ?>
9+
10+
<table border="0" width="100%"><tr><td align="left" valign="top" width="80%">
11+
<pre>
12+
13+
<?php
14+
if(isset($_POST[pinghost])) {
15+
16+
$cmd = "ping $_POST[pinghost] -c4";
17+
exec ($cmd, $output);
18+
foreach($output as $outputline) {
19+
echo ("$outputline\n");}
20+
21+
}
22+
?>
23+
24+
</pre>
25+
</td><td valign="top" align="left" width="*">
26+
<pre>
27+
28+
29+
30+
<font color="white">
31+
\
32+
\ \
33+
\ \ \</font><font color="green">
34+
<, .v , // </font><font color="white">) ) ) ) )</font><font color="green">
35+
\\; \// // </font><font color="white">/ / /</font><font color="green">
36+
;\\|||//; </font><font color="white">/ /</font><font color="yellow">
37+
,'<\/><\/` </font><font color="white">/</font><font color="yellow">
38+
,.`X/\><\\>`
39+
;>/>><\\><\/`
40+
|<\\>>X/<>/\|
41+
`<\/><\/><\\;
42+
'/\<>/\<>/'
43+
`<\/><;`</font><font color="white">wifi_pineapple</font>
44+
45+
</pre>
46+
</td></tr></table>
47+
</body>
48+
</html>

advanced/traceroute.php

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<html>
2+
<head>
3+
<title>Pineapple Control Center</title>
4+
<script type="text/javascript" src="jquery.min.js"></script>
5+
</head>
6+
<body bgcolor="black" text="white" alink="green" vlink="green" link="green">
7+
8+
<?php require('../includes/navbar.php'); ?>
9+
10+
<table border="0" width="100%"><tr><td align="left" valign="top" width="80%">
11+
<pre>
12+
13+
<?php
14+
if(isset($_POST[traceroutehost])) {
15+
16+
$cmd = "traceroute $_POST[traceroutehost]";
17+
exec ($cmd, $output);
18+
foreach($output as $outputline) {
19+
echo ("$outputline\n");}
20+
21+
}
22+
?>
23+
24+
</pre>
25+
</td><td valign="top" align="left" width="*">
26+
<pre>
27+
28+
29+
30+
<font color="white">
31+
\
32+
\ \
33+
\ \ \</font><font color="green">
34+
<, .v , // </font><font color="white">) ) ) ) )</font><font color="green">
35+
\\; \// // </font><font color="white">/ / /</font><font color="green">
36+
;\\|||//; </font><font color="white">/ /</font><font color="yellow">
37+
,'<\/><\/` </font><font color="white">/</font><font color="yellow">
38+
,.`X/\><\\>`
39+
;>/>><\\><\/`
40+
|<\\>>X/<>/\|
41+
`<\/><\/><\\;
42+
'/\<>/\<>/'
43+
`<\/><;`</font><font color="white">wifi_pineapple</font>
44+
45+
</pre>
46+
</td></tr></table>
47+
</body>
48+
</html>

config/resetButtonStatus

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enabled

config/restartuhttpd.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
if(isset($_GET[reload])){
3+
exec("/etc/init.d/uhttpd reload");
4+
}else{
5+
echo("done");
6+
}
7+
8+
?>
9+

config/spoofhost

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
172.16.42.1 example.com

config/wpsScript.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
#Script is executed when WPS button
3+
#is pressed for 2-4 seconds.

dnsspoof/dnsspoof.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
dnsspoof -i br-lan -f /pineapple/config/spoofhost > /dev/null 2>/pineapple/logs/dnsspoof.log

dnsspoof/startdnsspoof.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
exec ("echo '' > /pineapple/logs/dnsspoof.log");
3+
exec ("echo /pineapple/dnsspoof/dnsspoof.sh | at now");
4+
?>
5+
<html><head>
6+
<meta http-equiv="refresh" content="0; url=/">
7+
</head><body bgcolor="black" text="white"><pre>
8+
<?php
9+
echo "Entropy Bunny spoofing DNS<br/><br/>and having cake";
10+
?>
11+
</pre></head></body>

dnsspoof/stopdnsspoof.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
#exec ("kill `ps auxww | grep spoofhost | grep -v -e grep | awk '{print $1}'`");
3+
exec("killall dnsspoof");
4+
?>
5+
<html><head>
6+
<meta http-equiv="refresh" content="0; url=/">
7+
</head><body bgcolor="black" text="white"><pre>
8+
<?php
9+
echo "Entropy Bunny unspoofing";
10+
?>
11+
</pre></head></body>

favicon.ico

1.12 KB
Binary file not shown.

includes/ajax.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
function createRequest() {
2+
var request = null;
3+
try {
4+
request = new XMLHttpRequest();
5+
} catch (trymicrosoft) {
6+
try {
7+
request = new ActiveXObject("Msxml2.XMLHTTP");
8+
} catch (othermicrosoft) {
9+
try {
10+
request = new ActiveXObject("Microsoft.XMLHTTP");
11+
} catch (failed) {
12+
request = null;
13+
}
14+
}
15+
}
16+
17+
if (request == null) {
18+
alert("Error creating request object!");
19+
} else {
20+
return request;
21+
}
22+
}
23+
24+
var request1 = createRequest();

includes/fwversion

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.8.0

includes/jquery.min.js

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)