Skip to content

Commit 11e91ec

Browse files
committed
updates
1 parent 2c9a529 commit 11e91ec

1 file changed

Lines changed: 89 additions & 1 deletion

File tree

‎_posts/2023-05-17-wifi-pineapple-mk-7-wardriving.md‎

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,99 @@ There are 2 options that you can use for your GPS module.
3535
1. A USB GPS dongle
3636
2. Android phone over Wi-Fi with GPSd Forwarder
3737

38+
# Option 1
39+
40+
Follow the steps belew to setup wardriving with a USB GPS device.
41+
42+
### GPSd
43+
44+
Connect your GPS USB device to your pineapple and verify it is recognized by typing:
45+
```bash
46+
lsusb
47+
```
48+
49+
You should see the following output:
50+
51+
```bash
52+
Bus 001 Device 005: ID 1546:01a7 u-blox AG - www.u-blox.com u-blox 7 - GPS/GNSS Receiver
53+
```
54+
You can also verify by typing `dmesg | grep ttyACM0`. The output should be the following.
55+
56+
```bash
57+
[ 62.694133] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
58+
```
59+
60+
To verify everything is working run the following commands:
61+
62+
```bash
63+
gpsd /dev/ttyACM0
64+
```
65+
This tells gpsd the input source for GPS. If the command executes successfully then you can continue. Then type
66+
67+
```bash
68+
gpsmon
69+
```
70+
71+
TThen the output below should appear.
72+
```bash
73+
/dev/ttyACM0 u-blox>
74+
┌──────────────────────────┐┌─────────────────────────────────────────────────┐
75+
│Ch PRN Az El S/N Flag U ││ECEF Pos: 000000.00m 0000000.00m 0000000.00m │
76+
│ 0 0 000 0 00 0000 ││ECEF Vel: -0.00m/s +0.00m/s -0.00m/s │
77+
│ 1 0 000 0 00 0000 ││ │
78+
│ 2 00 000 00 00 000d Y ││LTP Pos: 00.000000000° 00.000000000° 00.00m │
79+
│ 3 00 00 0 00 000c ││LTP Vel: 0.00m/s 0.0° 0.00m/s │
80+
│ 4 00 00 00 00 000d Y ││ │
81+
│ 5 00 000 00 00 000d Y ││Time: 1 01:21:24.00 │
82+
│ 6 00 000 00 00 000d Y ││Time GPS: 2264+ 91284.000 Day: 1 │
83+
│ 7 00 00 00 00 000d Y ││ │
84+
│ 8 00 000 00 00 000d Y ││Est Pos Err 0.0 m Est Vel Err 0.00m/s │
85+
│ 9 00 000 00 00 000d Y ││PRNs: 0 PDOP: 0.0 Fix 0x00 Flags 0xdd │
86+
│10 000 000 00 0 0000 │└─────────────────── NAV_SOL ─────────────────────┘
87+
│11 000 000 00 0 0000 │┌─────────────────────────────────────────────────┐
88+
│12 000 000 00 0 0000 ││DOP [H] 0.0 [V] 0.0 [P] 0.0 [T] 0.0 [G] 0.0 │
89+
│13 000 0 -00 0 0000 │└─────────────────── NAV_DOP ─────────────────────┘
90+
│14 000 0 -00 0 0000 │┌─────────────────────────────────────────────────┐
91+
│15 000 0 -00 0 0000 ││TOFF: 0.000000000 PPS: N/A │
92+
└────── NAV_SVINFO ────────┘└─────────────────────────────────────────────────┘
93+
```
94+
## wardrive.sh script
95+
96+
After you've verified the GPS device is working you can setup the following wardrive.sh script.
97+
```bash
98+
#!/bin/bash
99+
100+
pkill gpsd # kill any current gpsd process
101+
pkill kismet # kill any kismet process
102+
ifconfig wlan1 down # bring down wlan1
103+
ifconfig wlan2 down # bring down wlan2
104+
#ifconfig wlan3 down # if you have the 5GHz module oncomment this line
105+
106+
gpsd -n /dev/ttyACM0 # Set the GPSD input from USB Device
107+
sleep 1 # wait for a lock
108+
#gpspipe -w | grep -qm 1 '"mode":3'
109+
110+
UTCDATE=`gpspipe -w | grep -m 1 "TPV" | sed -r 's/.*"time":"([^"]*)".*/\1/' | sed -e 's/^\(.\{10\}\)T\(.\{8\}\).*/\1 \2/'`
111+
# SET THE PINEAPPLE'S CLOCK
112+
date -u -s "$UTCDATE"
113+
114+
# LAUNCH KISMET DAEMON
115+
# If you have the 5Ghz module you will need to add wlan3 to the config
116+
iwconfig wlan1 mode Monitor
117+
iwconfig wlan2 mode Monitor
118+
kismet -p /root/kismetlogs -t wardirve --override wardrive -c wlan1 -c wlan2
119+
```
120+
121+
Copy this script to your Wifi Pineapple. After you've copied it over and your Android phone is streaming GPS information over wifi you can begin this script.
122+
123+
`chmod +x <filename>` to make the script executable.
124+
125+
`./<filename>` to run the script
38126
## Option 2
39127

40128
Follow the steps below to setup wardriving with an Android Phone.
41129

42-
### GPSd
130+
### GPSd Forwarder
43131
---
44132
1. Download GPSd Forwarder for Android off of [Google Play](https://play.google.com/store/apps/details?id=io.github.tiagoshibata.gpsdclient) or [F-Droid](https://f-droid.org/packages/io.github.tiagoshibata.gpsdclient/)
45133
2. Open the app and set the IP address to the address of your pineapple. (Default is 172.16.42.1)

0 commit comments

Comments
 (0)