Skip to content

pect0ral/python-pineapple

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-pineapple

WiFi pineapple API Wrapper written in python

Documentation

Documentation is a work in progress. It may not be complete for a while, but I believe the code to be very readable and if you do know python it shouldn't be too hard to figure out. Some hints:

  • All modules have the same name they do on the pineapple (all lower case). To see what a module can do just run help(fruit.getModule(modulename))
  • To find out more about the WiFi Pineapple API itself, set debug = True when instantiating your Pineapple()s and it will log the HTTP requests it makes
  • Read the WiFi Pineapple php source located on your pineapple at /pineapple/modules/$modulename/api/module.php as well as the corresponding python files in this project

Notes

This is currently undergoing a rewrite and some methods may appear to have duplicate functionality. This is being done to keep backward compatibility. Method names will mirror those shipped with Pineapple Firmware and associated Modules. Planning on adding some additional helpers. This README will be updated over time. Feel free to let me know if you want a specific feature.

Examples:

Instantiate a Pineapple object:
API_TOKEN = "xxxxxxxxxx..."
from pineapple import *
fruit = pineapple.Pineapple(API_TOKEN)
Add a notification:
fruit.getModule("notifications").addNotification("test")
Start PineAP
fruit.getModule("pineap").enable()
Deauth/dissasoc the clients 73:65:62:6b:69:6e and 6e:65:73:67:69:61 from the bssid 6e:74:64:69:63:6b 5 times on channel 1
fruit.getModule("pineap").deauth('6e:74:64:69:63:6b', ['73:65:62:6b:69:6e', '6e:65:73:67:69:61'], 5, 1)
Get SSID Pool
p = fruit.getModule("pineap").getSSIDPool()

Returns a dict. The pool is on the key "ssidPool" separated by newlines. To get a quick list, do the following:

ssids = p['ssidPool'].split('\n')
Download Scans

Some support for download files via token was added to api and recon

fruit.getModule("recon").downloadResults(1)

Will return a dict with key "download" and a unique download token for the results of Scan ID 1. So knowing that, you can call api.download now to get the results

myScan = fruit.api.download(fruit.getModule("recon").downloadResults(1)['download'])

myScan will be the raw file text. In the case of a recon scan, it is json. So you can make it more usable with json.loads(myScan) To generate API tokens, use the API Tokens module

About

WiFi pineapple API Wrapper written in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%