329 |
330 |
331 |
--------------------------------------------------------------------------------
/docs/python/modules/modules.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Modules
4 | nav_order: 312
5 | parent: WiFi Pineapple Python Documentation
6 | has_children: true
7 | has_toc: false
8 | ---
9 |
10 |
11 | # WiFi Pineapple Python Modules
12 | {: .no_toc }
13 |
14 | Table of contents
15 | {: .text-delta }
16 | 1. TOC
17 | {:toc}
18 | ---
19 |
20 | ## Introduction
21 | Python API
22 |
23 |
--------------------------------------------------------------------------------
/docs/python/modules/request/request.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Request
4 | nav_order: 313
5 | parent: Modules
6 | grand_parent: WiFi Pineapple Python Documentation
7 | has_toc: false
8 | ---
9 |
10 |
11 |
12 | # WiFi Pineapple Python Requests
13 | {: .no_toc }
14 |
15 | Table of contents
16 | {: .text-delta }
17 | 1. TOC
18 | {:toc}
19 | ---
20 |
21 | ## Introduction
22 | Python API
23 |
24 | ## Classes
25 |
32 |
33 | ```python
34 | class Module
35 | ```
36 |
37 | A Pineapple Module
38 |
39 |
Methods
40 |
41 | __init__(self)
42 |
43 |
44 |
45 |
46 |
47 |
48 | ```python
49 | def __init__(self)
50 | ```
51 |
52 | A WiFi Pineapple Module Request. Contains at least `self.module` and `self.action`, as well as any parameters given in a TypeScript API request.
53 |
54 |
55 |
56 |
57 | __repr__(self)
58 |
59 |
60 |
61 |
62 |
63 |
64 | ```python
65 | def __repr__(self)
66 | ```
67 |
68 | Dumps the given data from the API rquest into Request.
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/docs/python/python.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: WiFi Pineapple Python Documentation
4 | nav_order: 300
5 | has_children: true
6 | has_toc: false
7 | ---
8 |
9 | # WiFi Pineapple Python Documentation
10 | {: .no_toc }
11 |
12 | Table of contents
13 | {: .text-delta }
14 | 1. TOC
15 | {:toc}
16 | ---
17 |
18 | ## Introduction
19 | Python API
20 |
--------------------------------------------------------------------------------
/docs/rest/authentication/authentication.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Authentication
4 | nav_order: 102
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # REST Authentication
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | The WiFi Pineapple REST API will only accept requests that are sent with a valid token. Currently, the only way to generate a token is to login as the user. API Token generation is a planned feature.
24 |
25 | ```bash
26 | foxtrot@intent:~$ curl -X POST http://172.16.42.1:1471/api/login -d '{"username": "root", "password": "test"}'
27 | {"token":"eyJVc2VyIjoicm9vdCIsIkV4cGlyeSI6IjIwMjAtMDUtMTdUMTg6NDM6NTEuNjg1NjA5NTJaIn0=.VZpkUmWREeLMtKGx0wZFeWczj8hImbPnulTT5zpnQpM="}
28 | foxtrot@intent:~$
29 | ```
30 |
31 | The API endpoint responds with an error for invalid credentials, or a token on success. The token can then be used to make other API requests.
32 |
33 | ```bash
34 | foxtrot@intent:~$ curl -X PUT http://172.16.42.1:1471/api/notifications -H "Authorization: Bearer eyJVc2VyIjoicm9vdCIsIkV4cGlyeSI6IjIwMjAtMDUtMTdUMTg6NDM6NTEuNjg1NjA5NTJaIn0=.VZpkUmWREeLMtKGx0wZFeWczj8hImbPnulTT5zpnQpM=" -d '{"level": 0, "message": "Hello World!"}'
35 | {"success":true}
36 | foxtrot@intent:~$
37 | ```
38 | ```bash
39 | foxtrot@intent:~$ curl -X GET http://172.16.42.1:1471/api/notifications -H "Authorization: Bearer eyJVc2VyIjoicm9vdCIsIkV4cGlyeSI6IjIwMjAtMDUtMTdUMTg6NDM6NTEuNjg1NjA5NTJa
40 | In0=.VZpkUmWREeLMtKGx0wZFeWczj8hImbPnulTT5zpnQpM="
41 | [{"id":1,"message":"Hello World!","level":0,"time":"2020-09-18T10:30:21.031669675Z","read":false,"displayed":false,"module_name":""}]
42 | foxtrot@intent:~$
43 | ```
44 |
45 | ## Endpoints
46 |
47 | Authenticate with the WiFi Pineapple Mark 7
48 |
49 | POST
50 | /api/login
51 |
52 |
53 |
54 | Obtain an authentication token.
55 |
Request Body
56 |
57 | ```json
58 | {
59 | "username": string,
60 | "password": string,
61 | }
62 | ```
63 |
64 |
65 |
Response
66 |
If successful , returns authentication token:
67 |
68 | ```json
69 | {
70 | "token": string
71 | }
72 | ```
73 |
74 |
If unsuccessful : See REST Error Responses
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/docs/rest/campaigns/campaigns.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Campaigns
4 | nav_order: 106
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Campaigns
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | Manage Campaigns
24 |
25 | ## Types
26 |
27 | Campaign
28 |
29 |
30 |
31 | ```typescript
32 | export interface Campaign {
33 | enabled?: boolean;
34 | content?: string;
35 | name: string;
36 | created: number;
37 | type: number;
38 | timeout?: boolean;
39 | }
40 | ```
41 |
42 |
43 |
44 | CampaignReport
45 |
46 |
47 |
48 | ```typescript
49 | export interface CampaignReport {
50 | fileName: string;
51 | fullPath: string;
52 | }
53 | ```
54 |
55 |
56 |
57 | ## Endpoints
58 |
59 | Get All Campaigns
60 |
61 | GET
62 | /api/campaigns
63 |
64 |
65 |
66 |
Response
67 |
If successful , returns all campaigns:
68 |
69 | ```json
70 | {
71 | "campaigns": Campaign[]
72 | }
73 | ```
74 |
75 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
76 |
77 |
78 | Get All Campaign Reports
79 |
80 | GET
81 | /api/campaigns/reports
82 |
83 |
84 |
85 |
Response
86 |
If successful , returns all campaign reports:
87 |
88 | ```json
89 | {
90 | "fullPath": string,
91 | "fileName": string
92 | }
93 | ```
94 |
95 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
96 |
97 |
98 | Delete Campaign Report
99 |
100 | DELETE
101 | /api/campaigns/reports/:name
102 |
103 |
104 |
105 |
Response
106 |
If successful , returns success state:
107 |
108 | ```json
109 | {
110 | "success": true
111 | }
112 | ```
113 |
114 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
115 |
116 |
117 | Create New Campaign
118 |
119 | PUT
120 | /api/campaigns/create
121 |
122 |
123 |
124 |
Request Body
125 |
126 | ```json
127 | {
128 | "name": string,
129 | "mode": number,
130 | "autoRun": bool,
131 | "interval": string,
132 | "plainReport": bool,
133 | "htmlReport": bool,
134 | "storagePath": string,
135 | "enableC2": bool,
136 | "enableC2Exfil": bool
137 | }
138 | ```
139 |
140 |
141 |
Response
142 |
If successful , returns success state:
143 |
144 | ```json
145 | {
146 | "success": true
147 | }
148 | ```
149 |
150 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
151 |
152 |
153 | Delete Campaign
154 |
155 | DELETE
156 | /api/campaigns/:name
157 |
158 |
159 |
160 |
Response
161 |
If successful , returns success state:
162 |
163 | ```json
164 | {
165 | "success": true
166 | }
167 | ```
168 |
169 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
170 |
171 |
172 | Get Campaign
173 |
174 | GET
175 | /api/campaigns/:name
176 |
177 |
178 |
179 |
Response
180 |
If successful , returns the requested campaign:
181 |
182 | ```json
183 | {
184 | "campaign": Campaign
185 | }
186 | ```
187 |
188 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
189 |
190 |
191 | Save Campaign
192 |
193 | PUT
194 | /api/campaigns/:name
195 |
196 |
197 |
198 |
Request Body
199 |
200 | ```json
201 | {
202 | "name": string,
203 | "content": string
204 | }
205 | ```
206 |
207 |
208 |
Response
209 |
If successful , returns success state:
210 |
211 | ```json
212 | {
213 | "success": true
214 | }
215 | ```
216 |
217 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
218 |
219 |
220 | Enable Campaign
221 |
222 | PUT
223 | /api/campaigns/:name/enable
224 |
225 |
226 |
227 |
Response
228 |
If successful , returns success state:
229 |
230 | ```json
231 | {
232 | "success": true
233 | }
234 | ```
235 |
236 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
237 |
238 |
239 | Disable Campaign
240 |
241 | DELETE
242 | /api/campaigns/:name/disable
243 |
244 |
245 |
246 |
Response
247 |
If successful , returns success state:
248 |
249 | ```json
250 | {
251 | "success": true
252 | }
253 | ```
254 |
255 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
256 |
257 |
258 |
259 |
260 |
261 |
--------------------------------------------------------------------------------
/docs/rest/dashboard/dashboard.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Dashboard
4 | nav_order: 105
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Dashboard
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 | ---
20 |
21 | ## Introduction
22 | Dashboard resources and helpers.
23 |
24 | ## Types
25 |
26 |
27 | DashboardCardData
28 |
29 |
30 |
31 | ```typescript
32 | export interface DashboardCardData {
33 | clientsConnected: string;
34 | previousClients: string;
35 | diskUsage: DiskUsageInterface;
36 | mostPopularTraffic: TrafficInterface;
37 | reconScansRan: number;
38 | ssidsSeen: SSIDsSeenInterface;
39 | systemStatus: SystemStatusInterface;
40 | totalBandwidthUsed: number;
41 | }
42 | ```
43 |
44 |
45 |
46 | DiskUsageInterface
47 |
48 |
49 |
50 | ```typescript
51 | interface DiskUsageInterface {
52 | rootUsage: string;
53 | }
54 | ```
55 |
56 |
57 |
58 | TrafficInterface
59 |
60 |
61 |
62 | ```typescript
63 | interface TrafficInterface {
64 | first: string;
65 | second: string;
66 | third: string;
67 | }
68 | ```
69 |
70 |
71 |
72 | SSIDsSeenInterface
73 |
74 |
75 |
76 | ```typescript
77 | interface SSIDsSeenInterface {
78 | totalSSIDs: string;
79 | currentSSIDs: string;
80 | }
81 | ```
82 |
83 |
84 |
85 | SystemStatusInterface
86 |
87 |
88 |
89 | ```typescript
90 | interface SystemStatusInterface {
91 | cpuUsage: number;
92 | memoryUsage: number;
93 | temperature: number;
94 | }
95 | ```
96 |
97 |
98 |
99 | ## Endpoints
100 |
101 | Get Dashboard Card Data
102 |
103 | GET
104 | /api/dashboard/cards
105 |
106 |
107 |
108 |
Response
109 |
If successful , RETURNS:
110 |
111 | ```json
112 | {
113 | "systemStatus": SystemStatus,
114 | "diskUsage": DiskUsage,
115 | "clientsConnected": string,
116 | "previousClients": string,
117 | "ssidsSeen": SSIDsSeen
118 | }
119 | ```
120 |
121 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
122 |
123 |
124 | Get Dashboard News
125 |
126 | GET
127 | /api/dashboard/news
128 |
129 |
130 |
131 |
Response
132 |
If successful , returns latest news:
133 |
134 | ```json
135 | {
136 | "news": NewsItem[]
137 | }
138 | ```
139 |
140 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
141 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/docs/rest/errors/errors.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: REST Errors
4 | nav_order: 101
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 | # REST Errors
9 | {: .no_toc }
10 |
11 | ## Table of Contents
12 | {: .no_toc .text-delta }
13 |
14 | 1. TOC
15 | {:toc}
16 |
17 |
18 | ---
19 |
20 | ## Introduction
21 | The WiFi Pineapple REST API will return an error message when an error (any non-200 response) happens.
22 |
23 | On success, API requests will return a **200 OK** response, and may include a JSON body.
24 |
25 | On error, API requests may return a range of errors, most commonly a **500 Internal Server Error** or a **400 Bad Request**, as well as a JSON body containing an error message:
26 | ```json
27 | {
28 | "error": string
29 | }
30 | ```
31 |
32 |
--------------------------------------------------------------------------------
/docs/rest/generic/generic.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Generic
4 | nav_order: 104
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Generic
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | Generic actions such as shutdown, reboot, and getting the device status.
24 |
25 | ## Endpoints
26 |
27 | Reboot the WiFi Pineapple Mark 7
28 |
29 | POST
30 | /api/reboot
31 |
32 |
33 |
34 |
Response
35 |
If successful , returns success state:
36 |
37 | ```json
38 | {
39 | "success": true
40 | }
41 | ```
42 |
43 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
44 |
45 |
46 | Shutdown the WiFi Pineapple Mark 7
47 |
48 | POST
49 | /api/shutdown
50 |
51 |
52 |
53 |
Response
54 |
If successful , returns success state:
55 |
56 | ```json
57 | {
58 | "success": true
59 | }
60 | ```
61 |
62 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
63 |
64 |
65 | Get WiFi Pineapple Mark 7 Status
66 |
67 | GET
68 | /api/status
69 |
70 |
71 |
72 |
Response
73 |
If successful , returns device status:
74 |
75 | ```json
76 | {
77 | "versionString": string,
78 | "version": string,
79 | "uptime": number,
80 | "hostname": string,
81 | "time": number
82 | "warnings": PineappleWarnings,
83 | "errors" PineappleErrors
84 | }
85 | ```
86 |
87 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
88 |
89 |
90 | Get WiFi Pineapple Mark 7 Model
91 |
92 | GET
93 | /api/device
94 |
95 |
96 |
97 |
Response
98 |
If successful , returns device model:
99 |
100 | ```json
101 | {
102 | "device": string
103 | }
104 | ```
105 |
106 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
107 |
108 |
109 | Download File
110 |
111 | POST
112 | /api/download
113 |
114 |
115 |
116 |
Request Body
117 |
118 | ```json
119 | {
120 | "filename": string
121 | }
122 | ```
123 |
124 |
125 |
Response
126 |
If successful , returns stream of specified file
127 |
128 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
129 |
130 |
131 | Lookup OUI Vendor
132 |
133 | GET
134 | /api/helpers/lookupOUI/:oui
135 |
136 |
137 |
138 |
Response
139 |
If successful , returns an OUI vendor:
140 |
141 | ```json
142 | {
143 | "available": true,
144 | "vendor": string
145 | }
146 | ```
147 |
148 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
149 |
150 |
151 | Check Internet Connection
152 |
153 | GET
154 | /api/helpers/checkonline
155 |
156 |
157 |
158 |
Response
159 |
If successful , returns internet connectivity status:
160 |
161 | ```json
162 | {
163 | "online": boolean
164 | }
165 | ```
166 |
167 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
168 |
169 |
170 |
171 |
172 |
173 |
--------------------------------------------------------------------------------
/docs/rest/modules/modules.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Modules
4 | nav_order: 111
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Modules
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | Modules are third-party extensions for the WiFi Pineapple.
24 |
25 | ## Endpoints
26 |
27 | Handle Module Request
28 |
29 | POST
30 | /api/module/request
31 |
32 |
33 |
34 |
Request Body
35 |
36 | ```json
37 | {
38 | BODY
39 | }
40 | ```
41 |
42 |
43 |
Response
44 |
If successful , RETURNS:
45 |
46 | ```json
47 | {
48 | RESPONSE
49 | }
50 | ```
51 |
52 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
53 |
54 |
55 | Get Modules
56 |
57 | GET
58 | /api/modules
59 |
60 |
61 |
62 |
Request Body
63 |
64 | ```json
65 | {
66 | BODY
67 | }
68 | ```
69 |
70 |
71 |
Response
72 |
If successful , RETURNS:
73 |
74 | ```json
75 | {
76 | RESPONSE
77 | }
78 | ```
79 |
80 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
81 |
82 |
83 | Create Module
84 |
85 | PUT
86 | /api/modules/create
87 |
88 |
89 |
90 |
Request Body
91 |
92 | ```json
93 | {
94 | BODY
95 | }
96 | ```
97 |
98 |
99 |
Response
100 |
If successful , RETURNS:
101 |
102 | ```json
103 | {
104 | RESPONSE
105 | }
106 | ```
107 |
108 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
109 |
110 |
111 | Install Remote Module
112 |
113 | PUT
114 | /api/modules/install
115 |
116 |
117 |
118 |
Request Body
119 |
120 | ```json
121 | {
122 | BODY
123 | }
124 | ```
125 |
126 |
127 |
Response
128 |
If successful , RETURNS:
129 |
130 | ```json
131 | {
132 | RESPONSE
133 | }
134 | ```
135 |
136 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
137 |
138 |
139 | Sideload Module
140 |
141 | PUT
142 | /api/modules/sideload/tar
143 |
144 |
145 |
146 |
Request Body
147 |
148 | ```json
149 | {
150 | BODY
151 | }
152 | ```
153 |
154 |
155 |
Response
156 |
If successful , RETURNS:
157 |
158 | ```json
159 | {
160 | RESPONSE
161 | }
162 | ```
163 |
164 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
165 |
166 |
167 | Get list of available Modules
168 |
169 | GET
170 | /api/modules/available
171 |
172 |
173 |
174 |
Request Body
175 |
176 | ```json
177 | {
178 | BODY
179 | }
180 | ```
181 |
182 |
183 |
Response
184 |
If successful , RETURNS:
185 |
186 | ```json
187 | {
188 | RESPONSE
189 | }
190 | ```
191 |
192 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
193 |
194 |
195 | Remove Module
196 |
197 | DELETE
198 | /api/modules/:moduleName
199 |
200 |
201 |
202 |
Request Body
203 |
204 | ```json
205 | {
206 | BODY
207 | }
208 | ```
209 |
210 |
211 |
Response
212 |
If successful , RETURNS:
213 |
214 | ```json
215 | {
216 | RESPONSE
217 | }
218 | ```
219 |
220 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
221 |
222 |
223 | Mark Module as Favourite
224 |
225 | POST
226 | /api/modules/favourite/:moduleName
227 |
228 |
229 |
230 |
Request Body
231 |
232 | ```json
233 | {
234 | BODY
235 | }
236 | ```
237 |
238 |
239 |
Response
240 |
If successful , RETURNS:
241 |
242 | ```json
243 | {
244 | RESPONSE
245 | }
246 | ```
247 |
248 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
249 |
250 |
251 |
252 |
253 |
254 |
--------------------------------------------------------------------------------
/docs/rest/notifications/notifications.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Notifications
4 | nav_order: 103
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Notifications
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | The notifications system allows modules or other tools to communicate with the WiFi Pineapple user via the UI. You may specify a notification level, message, and optionally the name of the module that sent the notification.
24 |
25 | ## Endpoints
26 |
27 | Create Notification
28 |
29 | PUT
30 | /api/notifications
31 |
32 |
33 |
34 |
Request Body
35 |
36 | ```json
37 | {
38 | "level": number,
39 | "message": string,
40 | "module_name": string
41 | }
42 | ```
43 |
44 |
45 |
Response
46 |
If successful , returns success state:
47 |
48 | ```json
49 | {
50 | "success": true
51 | }
52 | ```
53 |
54 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
55 |
56 |
57 | Get Notifications
58 |
59 | GET
60 | /api/notifications
61 |
62 |
63 |
64 |
Response
65 |
If successful , returns an array of notifications:
66 |
67 | ```json
68 | [{
69 | "id": number,
70 | "message": string,
71 | "level": number,
72 | "time": string,
73 | "read": bool,
74 | "displayed": bool,
75 | "module_name": string
76 | }]
77 | ```
78 |
79 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
80 |
81 |
82 | Delete All Notifications
83 |
84 | DELETE
85 | /api/notifications
86 |
87 |
88 |
89 |
Response
90 |
If successful , returns success state:
91 |
92 | ```json
93 | {
94 | "success": true
95 | }
96 | ```
97 |
98 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
99 |
100 |
101 | Delete Notification
102 |
103 | DELETE
104 | /api/notifications/:notificationId
105 |
106 |
107 |
108 |
Response
109 |
If successful , returns success state:
110 |
111 | ```json
112 | {
113 | "success": true
114 | }
115 | ```
116 |
117 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
118 |
119 |
120 | Mark All Notifications as Read
121 |
122 | PUT
123 | /api/notifications/read
124 |
125 |
126 |
127 |
Response
128 |
If successful , returns success state:
129 |
130 | ```json
131 | {
132 | "success": true
133 | }
134 | ```
135 |
136 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
137 |
138 |
139 | Mark Notification as Read
140 |
141 | PUT
142 | /api/notifications/:notificationId/read
143 |
144 |
145 |
146 |
Response
147 |
If successful , returns success state:
148 |
149 | ```json
150 | {
151 | "success": true
152 | }
153 | ```
154 |
155 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
156 |
157 |
158 | Mark Notification as Displayed
159 |
160 | PUT
161 | /api/notifications/:notificationId/displayed
162 |
163 |
164 |
165 |
Response
166 |
If successful , returns success state:
167 |
168 | ```json
169 | {
170 | "success": true
171 | }
172 | ```
173 |
174 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
175 |
176 |
177 |
178 |
179 |
180 |
--------------------------------------------------------------------------------
/docs/rest/pineap/pineap.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: PineAP
4 | nav_order: 107
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # PineAP
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | Manage PineAP
24 |
25 | ## Types
26 |
27 | PineAPSettings
28 |
29 |
30 |
31 | ```typescript
32 | export interface PineAPSettings {
33 | "enablePineAP": bool,
34 | "autostartPineAP": bool,
35 | "ap_channel": string,
36 | "beacon_interval": string,
37 | "beacon_response_interval": string,
38 | "beacon_responses": bool,
39 | "broadcast_ssid_pool": bool,
40 | "capture_ssids": bool,
41 | "connect_notifications": bool,
42 | "disconnect_notifications": bool,
43 | "karma": bool,
44 | "logging": bool,
45 | "pineap_mac": string,
46 | "target_mac": string,
47 | }
48 | ```
49 |
50 |
51 |
52 | ChallengeResponse
53 |
54 |
55 |
56 | ```typescript
57 | export interface ChallengeResponse {
58 | "type": string,
59 | "username": string,
60 | "challenge": string,
61 | "response": string
62 | }
63 | ```
64 |
65 |
66 |
67 | BasicResponse
68 |
69 |
70 |
71 | ```typescript
72 | export interface BasicResponse {
73 | "type": string,
74 | "identity": string,
75 | "password": string,
76 | }
77 | ```
78 |
79 |
80 |
81 | Log
82 |
83 |
84 |
85 | ```typescript
86 | export interface Log {
87 | "type": int,
88 | "mac": string,
89 | "ssid": string,
90 | "duplicates": int,
91 | "created": int,
92 | "updated": int,
93 | }
94 | ```
95 |
96 |
97 |
98 | ## Endpoints
99 |
100 | Get PineAP Settings
101 |
102 | GET
103 | /api/pineap/settings
104 |
105 |
106 |
107 |
Response
108 |
If successful , returns current PineAP settings:
109 |
110 | ```json
111 | {
112 | "enablePineAP": bool,
113 | "AutoStart": bool,
114 | "ap_channel": string,
115 | "beacon_interval": string,
116 | "beacon_response_interval": string,
117 | "beacon_responses": bool,
118 | "broadcast_ssid_pool": bool,
119 | "capture_ssids": bool,
120 | "connect_notifications": bool,
121 | "disconnect_notifications": bool,
122 | "karma": bool,
123 | "logging": bool,
124 | "pineap_mac": string,
125 | "target_mac": string
126 | }
127 | ```
128 |
129 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
130 |
131 |
132 | Save PineAP Settings
133 |
134 | PUT
135 | /api/pineap/settings
136 |
137 |
138 |
139 |
Request Body
140 |
141 | ```json
142 | {
143 | "enablePineAP": bool,
144 | "AutoStart": bool,
145 | "ap_channel": string,
146 | "beacon_interval": string,
147 | "beacon_response_interval": string,
148 | "beacon_responses": bool,
149 | "broadcast_ssid_pool": bool,
150 | "capture_ssids": bool,
151 | "connect_notifications": bool,
152 | "disconnect_notifications": bool,
153 | "karma": bool,
154 | "logging": bool,
155 | "pineap_mac": string,
156 | "target_mac": string
157 | }
158 | ```
159 |
160 |
161 |
Response
162 |
If successful , returns success state:
163 |
164 | ```json
165 | {
166 | "success": true
167 | }
168 | ```
169 |
170 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
171 |
172 |
173 | Get SSID Pool
174 |
175 | GET
176 | /api/pineap/ssids
177 |
178 |
179 |
180 |
Response
181 | If successful , returns a string of SSIDs seperated by newlines.
182 | If unsuccessful : [See REST Error Responses](../../errors/errors)
183 |
184 |
185 | Clear SSID Pool
186 |
187 | DELETE
188 | /api/pineap/ssids
189 |
190 |
191 |
192 |
Response
193 |
If successful , returns:
194 |
195 | ```json
196 | {
197 | "success": true
198 | }
199 | ```
200 |
201 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
202 |
203 |
204 | Add SSID to Pool
205 |
206 | PUT
207 | /api/pineap/ssids/ssid
208 |
209 |
210 |
211 |
Request Body
212 |
213 | ```json
214 | {
215 | "ssid": string
216 | }
217 | ```
218 |
219 |
220 |
Response
221 |
If successful , returns:
222 |
223 | ```json
224 | {
225 | "success": true
226 | }
227 | ```
228 |
229 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
230 |
231 |
232 | Remove SSID from Pool
233 |
234 | DELETE
235 | /api/pineap/ssids/ssid
236 |
237 |
238 |
239 |
Request Body
240 |
241 | ```json
242 | {
243 | "ssid": string
244 | }
245 | ```
246 |
247 |
248 |
Response
249 |
If successful , returns:
250 |
251 | ```json
252 | {
253 | "success": true
254 | }
255 | ```
256 |
257 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
258 |
259 |
260 | Get WPA Handshakes
261 |
262 | GET
263 | /api/pineap/handshakes
264 |
265 |
266 |
267 |
Response
268 |
If successful , returns:
269 |
270 | ```json
271 | {
272 | "handshakes": Handshake[]
273 | }
274 | ```
275 |
276 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
277 |
278 |
279 | Delete All WPA Handshakes
280 |
281 | DELETE
282 | /api/pineap/handshakes
283 |
284 |
285 |
286 |
Response
287 |
If successful , returns:
288 |
289 | ```json
290 | {
291 | "success": true
292 | }
293 | ```
294 |
295 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
296 |
297 |
298 | Start WPA Handshake Capture
299 |
300 | POST
301 | /api/pineap/handshakes/start
302 |
303 |
304 |
305 |
Request Body
306 |
307 | ```json
308 | {
309 | "bssid": string,
310 | "channel": number,
311 | }
312 | ```
313 |
314 |
315 |
Response
316 |
If successful , returns:
317 |
318 | ```json
319 | {
320 | "success": true
321 | }
322 | ```
323 |
324 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
325 |
326 |
327 | Stop WPA Handshake Capture
328 |
329 | POST
330 | /api/pineap/handshakes/stop
331 |
332 |
333 |
334 |
Response
335 |
If successful , returns:
336 |
337 | ```json
338 | {
339 | "success": true
340 | }
341 | ```
342 |
343 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
344 |
345 |
346 | Check if WPA Handshake Capture Active
347 |
348 | GET
349 | /api/pineap/handshakes/check
350 |
351 |
352 |
353 |
Response
354 |
If successful , returns:
355 |
356 | ```json
357 | {
358 | "captureRunning": bool,
359 | "bssid": string
360 | }
361 | ```
362 |
363 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
364 |
365 |
366 | Delete WPA Handshake
367 |
368 | DELETE
369 | /api/pineap/handshakes/delete
370 |
371 |
372 |
373 |
Request Body
374 |
375 | ```json
376 | {
377 | "type": string,
378 | "bssid": bssid
379 | }
380 | ```
381 |
382 |
383 |
Response
384 |
If successful , returns:
385 |
386 | ```json
387 | {
388 | "success": true
389 | }
390 | ```
391 |
392 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
393 |
394 |
395 | Get PineAP Enterprise Settings
396 |
397 | GET
398 | /api/pineap/enterprise/settings
399 |
400 |
401 |
402 |
Response
403 |
If successful , returns:
404 |
405 | ```json
406 | {
407 | "enabled": bool,
408 | "associations": bool,
409 | "ssid": string,
410 | "mac": string,
411 | "type": string,
412 | "downgrade": string
413 | }
414 | ```
415 |
416 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
417 |
418 |
419 | Save PineAP Enterprise Settings
420 |
421 | PUT
422 | /api/pineap/enterprise/settings
423 |
424 |
425 |
426 |
Request Body
427 |
428 | ```json
429 | {
430 | "enabled": bool,
431 | "associations": bool,
432 | "ssid": string,
433 | "mac": string,
434 | "type": string,
435 | "downgrade": string
436 | }
437 | ```
438 |
439 |
440 |
Response
441 |
If successful , returns:
442 |
443 | ```json
444 | {
445 | "success": true
446 | }
447 | ```
448 |
449 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
450 |
451 |
452 | Check if Enterprise Certificate available
453 |
454 | GET
455 | /api/pineap/enterprise/cert
456 |
457 |
458 |
459 |
Response
460 |
If successful , returns:
461 |
462 | ```json
463 | {
464 | "installed": bool
465 | }
466 | ```
467 |
468 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
469 |
470 |
471 | Delete Enterprise Certificate
472 |
473 | DELETE
474 | /api/pineap/enterprise/cert
475 |
476 |
477 |
478 |
Response
479 |
If successful , returns:
480 |
481 | ```json
482 | {
483 | "success": true
484 | }
485 | ```
486 |
487 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
488 |
489 |
490 | Generate Enterprise Certificate
491 |
492 | POST
493 | /api/pineap/enterprise/generatecert
494 |
495 |
496 |
497 |
Request Body
498 |
499 | ```json
500 | {
501 | "state": string,
502 | "country": string,
503 | "locality": string,
504 | "organization": string,
505 | "email": string,
506 | "commonname": string
507 | }
508 | ```
509 |
510 |
511 |
Response
512 |
If successful , returns:
513 |
514 | ```json
515 | {
516 | "success": true
517 | }
518 | ```
519 |
520 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
521 |
522 |
523 | Get Basic PineAP Enterprise Data
524 |
525 | GET
526 | /api/pineap/enterprise/basicdata
527 |
528 |
529 |
530 |
Response
531 | If successful , returns `BasicResponse[]`
532 | If unsuccessful : [See REST Error Responses](../../errors/errors)
533 |
534 |
535 | Clear Basic PineAP Enterprise Data
536 |
537 | DELETE
538 | /api/pineap/enterprise/basicdata
539 |
540 |
541 |
542 |
Response
543 |
If successful , returns:
544 |
545 | ```json
546 | {
547 | "success": true
548 | }
549 | ```
550 |
551 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
552 |
553 |
554 | Get PineAP Enterprise Challenge Data
555 |
556 | GET
557 | /api/pineap/enterprise/challengedata
558 |
559 |
560 |
561 |
Response
562 | If successful , returns `ChallengeResponse[]`.
563 | If unsuccessful : [See REST Error Responses](../../errors/errors)
564 |
565 |
566 | Clear PineAP Enterprise Challenge Data
567 |
568 | DELETE
569 | /api/pineap/enterprise/challengedata
570 |
571 |
572 |
573 |
Response
574 |
If successful , returns:
575 |
576 | ```json
577 | {
578 | "success": true
579 | }
580 | ```
581 |
582 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
583 |
584 |
585 | Get Connected Clients
586 |
587 | GET
588 | /api/pineap/clients
589 |
590 |
591 |
592 |
Response
593 | If successful , returns `Client[]`.
594 | If unsuccessful : [See REST Error Responses](../../errors/errors)
595 |
596 |
597 | Get Connected Client Count
598 |
599 | GET
600 | /api/pineap/clients/count
601 |
602 |
603 |
604 |
Response
605 | If successful , returns `number`.
606 | If unsuccessful : [See REST Error Responses](../../errors/errors)
607 |
608 |
609 | Kick Connected Client
610 |
611 | DELETE
612 | /api/pineap/clients/kick
613 |
614 |
615 |
616 |
Request Body
617 |
618 | ```json
619 | {
620 | "mac": string
621 | }
622 | ```
623 |
624 |
625 |
Response
626 |
If successful , returns:
627 |
628 | ```json
629 | {
630 | "success": true
631 | }
632 | ```
633 |
634 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
635 |
636 |
637 | Get Previously Connected Clients
638 |
639 | GET
640 | /api/pineap/previousclients
641 |
642 |
643 |
644 |
Response
645 | If successful , returns `PreviousClient[]`.
646 | If unsuccessful : [See REST Error Responses](../../errors/errors)
647 |
648 |
649 | Remove Previously Connected Client
650 |
651 | DELETE
652 | /api/pineap/previousclients/remove
653 |
654 |
655 |
656 |
Request Body
657 |
658 | ```json
659 | {
660 | "mac": string
661 | }
662 | ```
663 |
664 |
665 |
Response
666 |
If successful , returns:
667 |
668 | ```json
669 | {
670 | "success": true
671 | }
672 | ```
673 |
674 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
675 |
676 |
677 | Get PineAP Log
678 |
679 | GET
680 | /api/pineap/logging
681 |
682 |
683 |
684 |
Response
685 | If successful , returns `Log[]`.
686 | If unsuccessful : [See REST Error Responses](../../errors/errors)
687 |
688 |
689 | Get Filters Client Mode
690 |
691 | GET
692 | /api/pineap/filters/client/mode
693 |
694 |
695 |
696 |
Response
697 |
If successful , returns:
698 |
699 | ```json
700 | {
701 | "mode": string
702 | }
703 | ```
704 |
705 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
706 |
707 |
708 | Set Filters Client Mode
709 |
710 | PUT
711 | /api/pineap/filters/client/mode
712 |
713 |
714 |
715 |
Request Body
716 |
717 | ```json
718 | {
719 | "mode": string
720 | }
721 | ```
722 |
723 |
724 |
Response
725 |
If successful , returns:
726 |
727 | ```json
728 | {
729 | "success": true
730 | }
731 | ```
732 |
733 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
734 |
735 |
736 | Get Filters Client List
737 |
738 | GET
739 | /api/pineap/filters/client/list
740 |
741 |
742 |
743 |
Response
744 | If successful , returns MAC addresses seperated by newlines.
745 | If unsuccessful : [See REST Error Responses](../../errors/errors)
746 |
747 |
748 | Set Filters Client List
749 |
750 | PUT
751 | /api/pineap/filters/client/list
752 |
753 |
754 |
755 |
Request Body
756 |
757 | ```json
758 | {
759 | "mac": string
760 | }
761 | ```
762 |
763 |
764 |
Response
765 |
If successful , returns:
766 |
767 | ```json
768 | {
769 | "success": true
770 | }
771 | ```
772 |
773 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
774 |
775 |
776 | Remove Client from Filter
777 |
778 | DELETE
779 | /api/pineap/filters/client/list
780 |
781 |
782 |
783 |
Request Body
784 |
785 | ```json
786 | {
787 | "mac": string
788 | }
789 | ```
790 |
791 |
792 |
Response
793 |
If successful , returns:
794 |
795 | ```json
796 | {
797 | "success": true
798 | }
799 | ```
800 |
801 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
802 |
803 |
804 | Get Filters SSID Mode
805 |
806 | GET
807 | /api/pineap/filters/ssid/mode
808 |
809 |
810 |
811 |
Response
812 |
If successful , returns:
813 |
814 | ```json
815 | {
816 | "mode": string
817 | }
818 | ```
819 |
820 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
821 |
822 |
823 | Set Filters SSID Mode
824 |
825 | PUT
826 | /api/pineap/filters/ssid/mode
827 |
828 |
829 |
830 |
Request Body
831 |
832 | ```json
833 | {
834 | "mode": string
835 | }
836 | ```
837 |
838 |
839 |
Response
840 |
If successful , returns:
841 |
842 | ```json
843 | {
844 | "success": true
845 | }
846 | ```
847 |
848 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
849 |
850 |
851 | Get Filters SSID List
852 |
853 | GET
854 | /api/pineap/filters/ssid/list
855 |
856 |
857 |
858 |
Response
859 | If successful , returns a string of SSIDs seperated by newlines.
860 | If unsuccessful : [See REST Error Responses](../../errors/errors)
861 |
862 |
863 | Set Filters SSID List
864 |
865 | PUT
866 | /api/pineap/filters/ssid/list
867 |
868 |
869 |
870 |
Request Body
871 |
872 | ```json
873 | {
874 | "mac": string
875 | }
876 | ```
877 |
878 |
879 |
Response
880 |
If successful , returns:
881 |
882 | ```json
883 | {
884 | "success": true
885 | }
886 | ```
887 |
888 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
889 |
890 |
891 | Remove SSID from Filter
892 |
893 | DELETE
894 | /api/pineap/filters/ssid/list
895 |
896 |
897 |
898 |
Request Body
899 |
900 | ```json
901 | {
902 | "ssid": string
903 | }
904 | ```
905 |
906 |
907 |
Response
908 |
If successful , returns:
909 |
910 | ```json
911 | {
912 | "success": true
913 | }
914 | ```
915 |
916 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
917 |
918 |
919 | Deauthenticate AP
920 |
921 | POST
922 | /api/pineap/deauth/ap
923 |
924 |
925 |
926 |
Request Body
927 |
928 | ```json
929 | {
930 | "bssid": string,
931 | "multiplier": number,
932 | "channel": number,
933 | "clients": string[]
934 | }
935 | ```
936 |
937 |
938 |
Response
939 |
If successful , returns:
940 |
941 | ```json
942 | {
943 | "success": true
944 | }
945 | ```
946 |
947 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
948 |
949 |
950 | Deauthenticate Client
951 |
952 | POST
953 | /api/pineap/deauth/client
954 |
955 |
956 |
957 |
Request Body
958 |
959 | ```json
960 | {
961 | "bssid": string,
962 | "mac": string,
963 | "multiplier": number,
964 | "channel": number
965 | }
966 | ```
967 |
968 |
969 |
Response
970 |
If successful , returns:
971 |
972 | ```json
973 | {
974 | "success": true
975 | }
976 | ```
977 |
978 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
979 |
980 |
981 |
982 |
983 |
984 |
--------------------------------------------------------------------------------
/docs/rest/recon/recon.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Recon
4 | nav_order: 108
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Recon
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | Manage Recon
24 |
25 | ## Types
26 |
27 | ReconResult
28 |
29 |
30 |
31 | ```typescript
32 | export interface ReconResult {
33 | "APResults": []APResult
34 | "OutOfRangeResult": []APClient
35 | "UnassociatedResult": []APClient
36 | }
37 | ```
38 |
39 |
40 |
41 |
42 | APResult
43 |
44 |
45 |
46 | ```typescript
47 | export interface APResult {
48 | "ssid": string
49 | "bssid": string
50 | "encryption": number
51 | "hidden": number
52 | "wps": number
53 | "channel": number
54 | "signal": number
55 | "data": number
56 | "last_seen": number
57 | "probes": number
58 | "clients": []APClient
59 | }
60 | ```
61 |
62 |
63 |
64 |
65 | APClient
66 |
67 |
68 |
69 | ```typescript
70 | export interface APClient {
71 | "client_mac": string
72 | "ap_mac": string
73 | "ap_channel": number
74 | "data": number
75 | "broadcast_probes": number
76 | "direct_probes": number
77 | "last_seen": string
78 | }
79 | ```
80 |
81 |
82 |
83 | ## Endpoints
84 |
85 | Start Recon Scan
86 |
87 | POST
88 | /api/recon/start
89 |
90 |
91 |
92 |
Request Body
93 |
94 | ```json
95 | {
96 | "live": bool,
97 | "scan_time": number,
98 | "band": string
99 | }
100 | ```
101 |
102 |
103 |
Response
104 |
If successful , returns scan status:
105 |
106 | ```json
107 | {
108 | "scanRunning": bool,
109 | "scanID": number
110 | }
111 | ```
112 |
113 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
114 |
115 |
116 | Stop Recon Scan
117 |
118 | POST
119 | /api/recon/stop
120 |
121 |
122 |
123 |
Response
124 |
If successful , returns success state:
125 |
126 | ```json
127 | {
128 | "success": true
129 | }
130 | ```
131 |
132 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
133 |
134 |
135 | Get Recon Scan Status
136 |
137 | GET
138 | /api/recon/status
139 |
140 |
141 |
142 |
Response
143 |
If successful , returns the current scan status:
144 |
145 | ```json
146 | {
147 | "captureRunning": bool,
148 | "scanRunning": bool,
149 | "continuous": bool,
150 | "scanPercent": number,
151 | "scanID": number
152 | }
153 | ```
154 |
155 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
156 |
157 |
158 | Get Recon Scans
159 |
160 | GET
161 | /api/recon/scans
162 |
163 |
164 |
165 |
Response
166 |
If successful , returns array of previous scans:
167 |
168 | ```json
169 | [{
170 | "scan_id": number,
171 | "date": string
172 | }]
173 | ```
174 |
175 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
176 |
177 |
178 | Get Recon Scan
179 |
180 | GET
181 | /api/recon/scans/:scan_id
182 |
183 |
184 |
185 |
Response
186 |
If successful , returns specified scan data:
187 |
188 | ```json
189 | {
190 | "APResults": APResult[],
191 | "OutOfRangeClientResults": APClient[],
192 | "UnassociatedClientResults": APClient[]
193 | }
194 | ```
195 |
196 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
197 |
198 |
199 | Delete Recon Scan
200 |
201 | DELETE
202 | /api/recon/scans/:scan_id
203 |
204 |
205 |
206 |
Response
207 |
If successful , returns success state:
208 |
209 | ```json
210 | {
211 | "success": true
212 | }
213 | ```
214 |
215 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
216 |
217 |
218 | Download Recon Scan
219 |
220 | POST
221 | /api/recon/scans/:scan_id/download/json
222 |
223 |
224 |
225 |
Response
226 | If successful , returns a JSON stream of the specified scan
227 |
228 | If unsuccessful : [See REST Error Responses](../../errors/errors)
229 |
230 |
231 |
232 |
233 |
234 |
--------------------------------------------------------------------------------
/docs/rest/rest.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: WiFi Pineapple REST Documentation
4 | nav_order: 100
5 | has_children: true
6 | has_toc: false
7 | ---
8 |
9 | # WiFi Pineapple REST Documentation
10 | {: .no_toc }
11 |
12 | ---
13 |
14 | ## Introduction
15 | The WiFi Pineapple Mark VII exposes a powerful REST API that allows you to control aspects of the device via a WiFi Pineapple Module or independently via HTTP requests.
16 |
17 | ## Sections
18 | - [REST Errors](errors/errors.md)
19 | - [Authentication](authentication/authentication.md)
20 | - [Notifications](notifications/notifications.md)
21 | - [Generic](generic/generic.md)
22 | - [Dashboard](dashboard/dashboard.md)
23 | - [Campaigns](campaigns/campaigns.md)
24 | - [PineAP](pineap/pineap.md)
25 | - [Recon](recon/recon.md)
26 | - [Modules](modules/modules.md)
27 | - [Settings](settings/settings.md)
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/rest/settings/settings.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Settings
4 | nav_order: 109
5 | parent: WiFi Pineapple REST Documentation
6 | ---
7 |
8 |
9 |
10 | # Settings
11 | {: .no_toc }
12 |
13 | ## Table of Contents
14 | {: .no_toc .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 | ---
21 |
22 | ## Introduction
23 | Manage Device Settings
24 |
25 | ## Types
26 |
27 | Handshake
28 |
29 |
30 |
31 | ```typescript
32 | export interface Handshake {
33 | "mac" string,
34 | "type": string,
35 | "extension" string,
36 | "source": string
37 | }
38 | ```
39 |
40 |
41 |
42 |
43 | ClientModeNetwork
44 |
45 |
46 |
47 | ```typescript
48 | export interface ClientModeNetwork {
49 | bssid: string;
50 | channel: string;
51 | encryption: boolean;
52 | password: string;
53 | quality: string;
54 | ssid: string;
55 | hidden: boolean;
56 | signal: string;
57 | }
58 | ```
59 |
60 |
61 |
62 |
63 |
64 | ## Endpoints
65 |
66 | Change Password
67 |
68 | PUT
69 | /api/settings/users/password
70 |
71 |
72 |
73 |
Request Body
74 |
75 | ```json
76 | {
77 | "old_password": string,
78 | "new_password": string,
79 | "confirm_password": string,
80 | }
81 | ```
82 |
83 |
84 |
Response
85 |
If successful , returns:
86 |
87 | ```json
88 | {
89 | "success": true
90 | }
91 | ```
92 |
93 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
94 |
95 |
96 | Get Timezone
97 |
98 | GET
99 | /api/settings/timezone
100 |
101 |
102 |
103 |
Response
104 |
If successful , returns:
105 |
106 | ```json
107 | {
108 | "timezone": string
109 | }
110 | ```
111 |
112 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
113 |
114 |
115 | Set Timezone
116 |
117 | PUT
118 | /api/settings/timezone
119 |
120 |
121 |
122 |
Request Body
123 |
124 | ```json
125 | {
126 | "timezone": string
127 | }
128 | ```
129 |
130 |
131 |
Response
132 |
If successful , returns:
133 |
134 | ```json
135 | {
136 | "success": true
137 | }
138 | ```
139 |
140 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
141 |
142 |
143 | Sync Browser Time
144 |
145 | PUT
146 | /api/settings/synctime
147 |
148 |
149 |
150 |
Request Body
151 |
152 | ```json
153 | {
154 | "timestamp": string
155 | }
156 | ```
157 |
158 |
159 |
Response
160 |
If successful , returns:
161 |
162 | ```json
163 | {
164 | "success": true
165 | }
166 | ```
167 |
168 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
169 |
170 |
171 | Get Button Script
172 |
173 | GET
174 | /api/settings/button
175 |
176 |
177 |
178 |
Response
179 |
If successful , returns:
180 |
181 | ```json
182 | {
183 | "button_script": string
184 | }
185 | ```
186 |
187 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
188 |
189 |
190 | Set Button Script
191 |
192 | PUT
193 | /api/settings/button
194 |
195 |
196 |
197 |
Request Body
198 |
199 | ```json
200 | {
201 | "button_script": string
202 | }
203 | ```
204 |
205 |
206 |
Response
207 |
If successful , returns:
208 |
209 | ```json
210 | {
211 | "success": true
212 | }
213 | ```
214 |
215 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
216 |
217 |
218 | Get Resource Information
219 |
220 | GET
221 | /api/settings/resources
222 |
223 |
224 |
225 |
Response
226 | If successful , returns `Resources`:
227 | If unsuccessful : [See REST Error Responses](../../errors/errors)
228 |
229 |
230 | Get USB Devices
231 |
232 | GET
233 | /api/settings/usb
234 |
235 |
236 |
237 |
Response
238 |
If successful , returns:
239 |
240 | ```json
241 | {
242 | "devices": string
243 | }
244 | ```
245 |
246 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
247 |
248 |
249 | Get Update Channel
250 |
251 | GET
252 | /api/settings/update/channel
253 |
254 |
255 |
256 |
Response
257 |
If successful , returns:
258 |
259 | ```json
260 | {
261 | "channel": string
262 | }
263 | ```
264 |
265 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
266 |
267 |
268 | Set Update Channel
269 |
270 | PUT
271 | /api/settings/update/channel
272 |
273 |
274 |
275 |
Request Body
276 |
277 | ```json
278 | {
279 | "channel": string
280 | }
281 | ```
282 |
283 |
284 |
Response
285 |
If successful , returns:
286 |
287 | ```json
288 | {
289 | "success": true
290 | }
291 | ```
292 |
293 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
294 |
295 |
296 | Get Updates
297 |
298 | GET
299 | /api/settings/update/refresh
300 |
301 |
302 |
303 |
Response
304 |
If successful , returns:
305 |
306 | ```json
307 | {
308 | "update_found": bool,
309 | "update_version": string,
310 | "update_changelog": string,
311 | "channel_closed": bool,
312 | }
313 | ```
314 |
315 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
316 |
317 |
318 | Perform Update
319 |
320 | POST
321 | /api/settings/update/apply
322 |
323 |
324 |
325 |
Response
326 |
If successful , returns:
327 |
328 | ```json
329 | {
330 | "success": true
331 | }
332 | ```
333 |
334 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
335 |
336 |
337 | Reinstall Firmware
338 |
339 | POST
340 | /api/settings/update/reinstall
341 |
342 |
343 |
344 |
Response
345 |
If successful , returns:
346 |
347 | ```json
348 | {
349 | "success": true
350 | }
351 | ```
352 |
353 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
354 |
355 |
356 | Enroll in Cloud C2
357 |
358 | PUT
359 | /api/settings/cloudc2/config
360 |
361 |
362 |
363 |
Form Body
364 |
365 | `c2config`: Cloud C2 Configuration
366 |
367 |
368 |
Response
369 |
If successful , returns:
370 |
371 | ```json
372 | {
373 | "success": true
374 | }
375 | ```
376 |
377 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
378 |
379 |
380 | Unenroll from Cloud C2
381 |
382 | DELETE
383 | /api/settings/cloudc2/config
384 |
385 |
386 |
387 |
Response
388 |
If successful , returns:
389 |
390 | ```json
391 | {
392 | "success": true
393 | }
394 | ```
395 |
396 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
397 |
398 |
399 | Check Cloud C2 Enrollment
400 |
401 | GET
402 | /api/settings/cloudc2/config
403 |
404 |
405 |
406 |
Response
407 |
If successful , returns:
408 |
409 | ```json
410 | {
411 | "enrolled": bool
412 | }
413 | ```
414 |
415 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
416 |
417 |
418 | Get Routing Table
419 |
420 | GET
421 | /api/settings/networking/routes
422 |
423 |
424 |
425 |
Response
426 |
If successful , returns:
427 |
428 | ```json
429 | {
430 | "routes": string
431 | }
432 | ```
433 |
434 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
435 |
436 |
437 | Get Management AP Configuration
438 |
439 | GET
440 | /api/settings/networking/ap/management
441 |
442 |
443 |
444 |
Response
445 |
If successful , returns:
446 |
447 | ```json
448 | {
449 | "ssid": string,
450 | "password": string,
451 | "hidden": bool,
452 | "disabled": bool
453 | }
454 | ```
455 |
456 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
457 |
458 |
459 | Save Management AP Configuration
460 |
461 | PUT
462 | /api/settings/networking/ap/management
463 |
464 |
465 |
466 |
Request Body
467 |
468 | ```json
469 | {
470 | "ssid": string,
471 | "password": string,
472 | "confirm_password": string,
473 | "hidden": bool,
474 | "disabled": bool
475 | }
476 | ```
477 |
478 |
479 |
Response
480 |
If successful , returns:
481 |
482 | ```json
483 | {
484 | "success": true
485 | }
486 | ```
487 |
488 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
489 |
490 |
491 | Get Open AP Configuration
492 |
493 | GET
494 | /api/settings/networking/ap/open
495 |
496 |
497 |
498 |
Response
499 |
If successful , returns:
500 |
501 | ```json
502 | {
503 | "ssid": string,
504 | "country": string,
505 | "channel": number,
506 | "hidden": bool
507 | }
508 | ```
509 |
510 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
511 |
512 |
513 | Save Open AP Configuration
514 |
515 | PUT
516 | /api/settings/networking/ap/open
517 |
518 |
519 |
520 |
Request Body
521 |
522 | ```json
523 | {
524 | "ssid": string,
525 | "country": string,
526 | "channel": number,
527 | "hidden": bool
528 | }
529 | ```
530 |
531 |
532 |
Response
533 |
If successful , returns:
534 |
535 | ```json
536 | {
537 | "success": true
538 | }
539 | ```
540 |
541 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
542 |
543 |
544 | Get Evil WPA Twin AP Configuration
545 |
546 | GET
547 | /api/settings/networking/ap/wpa
548 |
549 |
550 |
551 |
Response
552 |
If successful , returns:
553 |
554 | ```json
555 | {
556 | "ssid": string,
557 | "bssid": string,
558 | "auth": string,
559 | "password": string,
560 | "hidden": bool,
561 | "disabled": bool,
562 | "capture_handshakes": bool
563 | }
564 | ```
565 |
566 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
567 |
568 |
569 | Save Evil WPA Twin AP Configuration
570 |
571 | PUT
572 | /api/settings/networking/ap/wpa
573 |
574 |
575 |
576 |
Request Body
577 |
578 | ```json
579 | {
580 | "ssid": string,
581 | "bssid": string,
582 | "auth": string,
583 | "password": string,
584 | "confirm_password": string,
585 | "hidden": bool,
586 | "disabled": bool,
587 | "capture_handshakes": bool
588 | }
589 | ```
590 |
591 |
592 |
Response
593 |
If successful , returns:
594 |
595 | ```json
596 | {
597 | "success": true
598 | }
599 | ```
600 |
601 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
602 |
603 |
604 | Get Client Mode Status
605 |
606 | GET
607 | /api/settings/networking/clientmode/status
608 |
609 |
610 |
611 |
Response
612 |
If successful , returns:
613 |
614 | ```json
615 | {
616 | "interfaces": string[],
617 | "connected": bool,
618 | "ssid": string,
619 | "ip": string
620 | }
621 | ```
622 |
623 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
624 |
625 |
626 | Scan for Client Networks
627 |
628 | POST
629 | /api/settings/networking/clientmode/scan
630 |
631 |
632 |
633 |
Request Body
634 |
635 | ```json
636 | {
637 | "interface": string
638 | }
639 | ```
640 |
641 |
642 |
Response
643 |
If successful , returns `ScanResult[]`
644 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
645 |
646 |
647 | Connect to Network
648 |
649 | POST
650 | /api/settings/networking/clientmode/connect
651 |
652 |
653 |
654 |
Request Body
655 |
656 | ```json
657 | {
658 | "ssid": string,
659 | "bssid": string,
660 | "encryption": string,
661 | "password": string,
662 | "hidden": bool,
663 | "interface": string
664 | }
665 | ```
666 |
667 |
668 |
Response
669 |
If successful , returns:
670 |
671 | ```json
672 | {
673 | "success": true
674 | }
675 | ```
676 |
677 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
678 |
679 |
680 | Disconnect from Network
681 |
682 | POST
683 | /api/settings/networking/clientmode/disconnect
684 |
685 |
686 |
687 |
Response
688 |
If successful , returns:
689 |
690 | ```json
691 | {
692 | "success": true
693 | }
694 | ```
695 |
696 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
697 |
698 |
699 | Get Network Interfaces
700 |
701 | GET
702 | /api/settings/networking/interfaces
703 |
704 |
705 |
706 |
Response
707 | If successful , returns an array of network interfaces.
708 | If unsuccessful : [See REST Error Responses](../../errors/errors)
709 |
710 |
711 | Start Diagnostics
712 |
713 | POST
714 | /api/settings/diagnostics/start
715 |
716 |
717 |
718 |
Response
719 |
If successful , returns:
720 |
721 | ```json
722 | {
723 | "success": true
724 | }
725 | ```
726 |
727 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
728 |
729 |
730 | Get Diagnostics Status
731 |
732 | GET
733 | /api/settings/diagnostics/status
734 |
735 |
736 |
737 |
Response
738 |
If successful , returns:
739 |
740 | ```json
741 | {
742 | "completed": bool,
743 | "output": string
744 | }
745 | ```
746 |
747 |
If unsuccessful : [See REST Error Responses](../../errors/errors)
748 |
749 |
750 |
751 |
752 |
753 |
--------------------------------------------------------------------------------
/docs/typescript/typescript.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: WiFi Pineapple TypeScript Documentation
4 | nav_order: 200
5 | has_children: false
6 | has_toc: true
7 | ---
8 |
9 |
10 |
11 | # WiFi Pineapple TypeScript Documentation
12 | {: .no_toc }
13 |
14 | Table of contents
15 | {: .text-delta }
16 | 1. TOC
17 | {:toc}
18 | ---
19 |
20 | ## Introduction
21 | WiFi Pineapple Mark VII Module front-ends include a service named `ApiService` that offers a variety of helper functions, such as wrappers for easier interfaction with the [REST API](https://hak5.github.io/mk7-docs/docs/rest/rest/) or to communicate with [Modules](x). It is instantiated in the module component as `API`, an should always be named the same in custom components written by the module developer.
22 | ```typescript
23 | @Component({
24 | selector: 'lib-example-module',
25 | templateUrl: './example-module.component.html',
26 | styleUrls: ['./example-module.component.css']
27 | })
28 | export class ExampleModuleComponent implments OnInit {
29 | constructor(private API: ApiService) { }
30 |
31 | ngOnInit() { }
32 | }
33 | ```
34 |
35 | ## Module Requests
36 | Module requests are made with the `this.API.request()` function. It takes two arguments:
37 | - `payload: any`
38 | - `callback: any`
39 |
40 | The `payload` must be a JSON structure that contains **at least** two properties:
41 | - `module: string` (The name of the module you're making a request to)
42 | - `action: string` (The action you are making a request for)
43 |
44 | The `callback` is a function that takes a `response: any` as an argument. Extra data can be added to the request structure, and will be passwd to the module back-end where it may be processed.
45 |
46 | ```typescript
47 | // A simple Module request
48 | this.API.request({
49 | module: 'ExampleModule',
50 | action: 'some_action'
51 | }, (response) => {
52 | console.log(response);
53 | });
54 |
55 | // A module request with extra supplied data and error handling
56 | this.API.request({
57 | module: 'ExampleModule',
58 | action: 'another_action',
59 | my_data: 'My Own Data String',
60 | other_data: could_be_a_variable
61 | }, (response) {
62 | if (response.error) {
63 | // Handle Error
64 | console.log('An error happened');
65 | } else {
66 | // Handle Success
67 | console.log('Success!');
68 | }
69 | });
70 | ```
71 |
72 | ## REST API Requests
73 | Regular API requests should be made with the following functions, depending on the type of request as specified in the [REST API](https://hak5.github.io/mk7-docs/docs/rest/rest/) docs.
74 |
75 |
76 | Unauthenticate User
77 |
78 | void
79 |
80 |
81 |
82 |
Example
83 | Unauthenticate the current session.
84 |
85 | ```typescript
86 | this.API.unauth();
87 | ```
88 |
89 |
90 |
91 |
92 | Show Busy
93 |
94 | void
95 |
96 |
97 |
98 |
Example
99 | Enables a spinner in the UI title bar to indicate a busy state.
100 |
101 | ```typescript
102 | this.API.setBusy();
103 | ```
104 |
105 |
106 |
107 |
108 | Show Not Busy
109 |
110 | void
111 |
112 |
113 |
114 |
Example
115 | Disables the UI title bar busy spinner.
116 |
117 | ```typescript
118 | this.API.setNotBusy();
119 | ```
120 |
121 |
122 |
123 |
124 | API GET Request
125 |
126 | void
127 |
128 |
129 |
130 | ```typescript
131 | this.API.APIGet(path: string, callback: (any));
132 | ```
133 | Make a GET Request to a GET endpoint described in the REST API documentation.
134 |
Example
135 |
136 | ```typescript
137 | this.API.APIGet('/api/status', (resp) => {
138 | console.log(resp);
139 | });
140 | ```
141 |
142 |
143 |
144 |
145 | Asyncronous API GET Request
146 |
147 | Promise
148 |
149 |
150 |
151 | ```typescript
152 | async this.API.APIGetAsync(path: string);
153 | ```
154 | Asynchronously make a GET Request to a GET endpoint described in the REST API documentation.
155 |
Example
156 |
157 | ```typescript
158 | const resp: any = await this.API.APIGetAsync('/api/status');
159 | console.log(resp);
160 | ```
161 |
162 |
163 |
164 |
165 | API PUT Request
166 |
167 | void
168 |
169 |
170 |
171 | ```typescript
172 | this.API.APIPut(path: string, callback: (any));
173 | ```
174 | Make a PUT Request to a PUT endpoint described in the REST API documentation.
175 |
Example
176 |
177 | ```typescript
178 | this.API.APIPut('/api/status', (resp) => {
179 | console.log(resp);
180 | });
181 | ```
182 |
183 |
184 |
185 |
186 | Asyncronous API PUT Request
187 |
188 | Promise
189 |
190 |
191 |
192 | ```typescript
193 | async this.API.APIPutAsync(path: string);
194 | ```
195 | Asynchronously make a PUT Request to a PUT endpoint described in the REST API documentation.
196 |
Example
197 |
198 | ```typescript
199 | const resp: any = await this.API.APIPutAsync('/api/status');
200 | console.log(resp);
201 | ```
202 |
203 |
204 |
205 |
206 | API POST Request
207 |
208 | void
209 |
210 |
211 |
212 | ```typescript
213 | this.API.APIPost(path: string, body: any, callback: (any));
214 | ```
215 | Make a POST Request to a POST endpoint described in the REST API documentation.
216 |
Example
217 |
218 | ```typescript
219 | this.API.APIPost('/api/status', { content: 'content'}, (resp) => {
220 | console.log(resp);
221 | });
222 | ```
223 |
224 |
225 |
226 |
227 | Asyncronous API POST Request
228 |
229 | Promise
230 |
231 |
232 |
233 | ```typescript
234 | async this.API.APIGetAsync(path: string, body: any);
235 | ```
236 | Asynchronously make a POST Request to a POST endpoint described in the REST API documentation.
237 |
Example
238 |
239 | ```typescript
240 | const resp: any = await this.API.APIPostAsync('/api/status', { content: 'content'});
241 | console.log(resp);
242 | ```
243 |
244 |
245 |
246 |
247 | API DELETE Request
248 |
249 | void
250 |
251 |
252 |
253 | ```typescript
254 | this.API.APIDelete(path: string, callback: (any));
255 | ```
256 | Make a DELETE Request to a DELETE endpoint described in the REST API documentation.
257 |
Example
258 |
259 | ```typescript
260 | this.API.APIDelete('/api/status', (resp) => {
261 | console.log(resp);
262 | });
263 | ```
264 |
265 |
266 |
267 |
268 | Asyncronous API DELETE Request
269 |
270 | Promise
271 |
272 |
273 |
274 | ```typescript
275 | async this.API.APIDeleteAsync(path: string);
276 | ```
277 | Asynchronously make a DELETE Request to a DELETE endpoint described in the REST API documentation.
278 |
Example
279 |
280 | ```typescript
281 | const resp: any = await this.API.APIDeleteAsync('/api/status');
282 | console.log(resp);
283 | ```
284 |
285 |
286 |
287 |
288 | API File Download
289 |
290 | void
291 |
292 |
293 |
294 | ```typescript
295 | this.API.APIDownload(fullpath: string, filename: string);
296 | ```
297 |
Example
298 |
299 | ```typescript
300 | this.API.APIDownload('/tmp/log.txt', 'log-output');
301 | ```
302 |
303 |
304 |
305 |
306 |
307 |
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Home
4 | nav_order: 1
5 | description: "Hak5 WiFi Pineapple Mark 7 Developer Documentation"
6 | permalink: /
7 | ---
8 |
9 | # WiFi Pineapple Mark 7 Developer Documentation
10 | This is the home for technical and developer documentation for the WiFi Pineapple Mark VII.
11 |
12 |
13 |
--------------------------------------------------------------------------------