dr.broadus Posted September 15, 2016 Share Posted September 15, 2016 Hi All,I’m working on a research project to capture all packets going through my Pineapple Nano, filter them for specific metadata, and send periodic data reports to an FTP site. I have the Pineapple configured to launch tcpdump to capture packets, then launch a Python script to filter/process the pcap data, and then write the output to a small data file and then FTP it to a site for analysis. However, I’m having trouble getting the Python library I need (DPKT) to install on the Pineapple.I've tried using the PIP package manager to do the installation, but when trying to install PIP (via the get-pip.py script), it says one of the libraries (the Logging module) can’t be found. So, the installation fails. Does anyone have any experience installing PIP on a Pineapple (to the external SD card), or any ideas on why this is happening, or what to try next?I’m open to alternative methods to achieve the same goals, but I have the script working on an Ubuntu machine. So, I don’t understand why it’s not working on the Pineapple.Thanks DrB Link to comment Share on other sites More sharing options...
dr.broadus Posted September 16, 2016 Author Share Posted September 16, 2016 OK. As I'm really hoping to get this work done soon, I've decided to offer $50 to the first person who can help me find a solution to this problem. There may also be more paid contract opportunities for helping with this project in the near future. If there's a more appropriate forum, or a Pineapple Support channel where I should post issue, please let me know. Thanks, DrB Link to comment Share on other sites More sharing options...
dr.broadus Posted September 18, 2016 Author Share Posted September 18, 2016 Still working on this problem. I've switched to opkg installer, but am still having problems with it finding libraries. Anybody have any other suggestions? Is there a Python cross-compiler that might let me compile what I have working on my Ubuntu laptop, to run on the Pineapple Nano? If so, what settings would you recommend? I'm still offering $50 to the most helpful tip in achieving this objective, and possibly more paid work on this type of project. Thanks, DrB Link to comment Share on other sites More sharing options...
Torrey Posted September 18, 2016 Share Posted September 18, 2016 I haven't tested this, but maybe it'll help you get Pip installed. https://blog.nyanpasu.me/install-python-and-pip-on-openwrt/ Link to comment Share on other sites More sharing options...
Zylla Posted September 19, 2016 Share Posted September 19, 2016 This helped me getting pip to work on both of my Pineapples. It assumes factory-settings, and that you have a working sd-card on the Pineapple. opkg update opkg remove python-* (you need to run this line one more time, to completely remove everything) opkg remove python opkg --dest sd install python-pip opkg remove python-pip (The reason we install it, and then remove it is to install its dependencies) Then clone this pip github repo. https://github.com/pypa/pip, and copy it to your sd-card. (/sd/pip/) cd /sd/pip/ python setup.py install This gets pip up and running on both my Pineapple. When i install python-pip through opkg, it doesn't work. /sd/usr/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg contains only empty folders... However, when installed manually, it works. Just double-check that everything you install through pip gets installed to the correct place (sd-card / root), since the space on root is limited. Regarding cross-compiling python-extensions and libraries, try to see if you can find something useful here: https://github.com/nodesign/weio/wiki/Cross-Compiling-Py http://whatschrisdoing.com/blog/2009/10/16/cross-compiling-python-extensions/ Link to comment Share on other sites More sharing options...
Zylla Posted September 19, 2016 Share Posted September 19, 2016 It successfully installed DPKT on my Pineapple btw :) Link to comment Share on other sites More sharing options...
dr.broadus Posted September 19, 2016 Author Share Posted September 19, 2016 Thanks for the tips, Torrey and Zylla. It looks like I have it working now. Hopefully, your tips will also help others. I'm contacting you both regarding the reward. (The reward offer for this issue is closed now.) DrB Link to comment Share on other sites More sharing options...
Tom55555 Posted August 7, 2018 Share Posted August 7, 2018 Hi It is indeed true that the loggings module isn't installed in the light version of python that came with the wifi-pineapple. You can easily install the full version of python though by 'opkg install python' or just the required loggings module: 'opkg install python-logging'. Then you use the get-pip.py file to install pip. This worked for me. Hopefully this will be helpful to others. Tom Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.