From 9cb8d4d6698da35623df01fd5260e8744245520e Mon Sep 17 00:00:00 2001 From: Henry Pitcairn <735tesla@gmail.com> Date: Fri, 13 May 2016 18:31:49 -0400 Subject: [PATCH] Finish documenting modules --- api.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/api.md b/api.md index 076e4d0..7d5665f 100644 --- a/api.md +++ b/api.md @@ -75,8 +75,42 @@ Action|Description|Parameters `getCurrentVersion`|Returns the current firmware version on the pineapple|_none_ ### Clients #### Description +The Clients module allows for the monitoring and management of connected clients. For example, the following would kick the client with the MAC address `aa:bb:cc:dd:ee:ff`: +``` +{ + "module": "Clients", + "action": "kickClient", + "mac": "aa:bb:cc:dd:ee:ff" +} +``` +Action|Description|Parameters +------|-----------|---------- +`getClientData`|Returns a JSON array of connected clients|_none_ +`kickClient`|Kicks (disconnects) a connected client from the pineapple| + ### Configuration #### Description +The configuration module allows for the modification of several pineapple configuration options such as timezone and landing page. The example below would set the landing page content to `Pineapples are yummy`: +``` +{ + "module": "Configuration", + "action": "saveLandingPage", + "landingPageData": "Pineapples are yummy" +} +``` +Action|Description|Parameters +------|-----------|---------- +`getCurrentTimeZone`|Retrieves the current timezone of the pineapple|_none_ +`changeTimeZone`|Changes the pineapple's timezone| +`getLandingPageData`|Gets the current landing page data|_none_ +`saveLandingPage`|Changes the landing page content| +`changePassword`|Changes the password for the root user| +`resetPineapple`|Resets the pineapple (executes `mtd erase rootfs_data`)|_none_ +`haltPineapple`|Halts the pineapple|_none_ +`rebootPineapple`|Reboots the pineapple|_none_ +`getLandingPageStatus`|Shows whether the landing page is enabled or not|_none_ +`enableLandingPage`|Enables the landing page|_none_ +`disableLandingPage`|Disables the landing page|_none_ ### Dashboard #### Description You can use the Dashboards API to return useful values such as CPU usage, total SSIDs, SSIDs discovered this session and uptime. For example, the following will get the bulletins: @@ -201,11 +235,54 @@ Action|Description|Parameters `downloadPineAPPool`|Get a download link to the SSID pool (useful for client side modules)|_none_ ### Recon #### Description +The recon module allows for the detection of access points and clients within range of the pineapple. The following example would scan for nearby access points: +``` +{ + "module": "Recon", + "action": "startScan", + "scanType": "apOnly" +} +``` +Action|Description|Parameters +------|-----------|---------- +`startScan`|Starts a new scan| +`scanStatus`|Get the status or results of a scan| + ### Reporting #### Description +The reporting module allows you to control the automatic reporting features of the pineapple. For example, the following would return report contents: +``` +{ + "module": "Reporting", + "action": "getReportContents" +} +``` +Action|Description|Parameters +------|-----------|---------- +`getReportConfiguration`|Gets the current reporting configuration|_none_ +`getReportContents`|Gets the report contents|_none_ +`getEmailConfiguration`|Gets the current email configuration for reporting|_none_ +`setReportConfiguration`|Changes the report configuration| +`setReportContents`|Set which items get reported| +`setEmailConfiguration`|Set the email configuration| ### Tracking #### Description - +Tracking allows you to create custom scripts for tracking clients. The following example would set a new tracking script: +``` +{ + "module": "Tracking", + "action": "saveScript", + "trackingScript": "#!/bin/bash\n\nMAC=$1\nTYPE=$2 # 0 PROBE; 1 ASSOCIATION\nSSID=$3\n" +} +``` +Action|Description|Parameters +------|-----------|---------- +`getScript`|Gets the current tracking script contents|_none_ +`saveScript`|Sets the current tracking script contents|