Jump to content

Is there a convenient list of API Functions


andyfive

Recommended Posts

Hello everyone,

I was wondering where I could find a list of all of the pineapples api functions? I would like to try my hand at creating an infusion, and a reference would be very handy. Thanks in advance!

Link to comment
Share on other sites

  • 1 month later...

Sorry to kick up this old topic. I realize that you guys at hak5 are busily working on the new features and the HDK for release at defcon, but I was wondering if you could give me any sort of update regarding any API documentation? It would be great to see this info in the wiki. Thanks in advance! :grin:

Link to comment
Share on other sites

Ok, so I see that hak5 offers paid support and infusion creation. I would be willing to actually pay for api documentation, for the good of the pineapple community. Please pm me and let me know a price.

Link to comment
Share on other sites

Ok, so I see that hak5 offers paid support and infusion creation. I would be willing to actually pay for api documentation, for the good of the pineapple community. Please pm me and let me know a price.

And where did you actually saw that?

Link to comment
Share on other sites

Not actually sure now. I vaguely remembered seeing it somewhere, but can't find it now. Maybe I was thinking about something else..... Regardless, I am very disappointed with the lack of documentation. I have some great ideas for the pineapple, but software isn't my strong suite, so I need all the help that I can get.

Link to comment
Share on other sites

Regardless, I am very disappointed with the lack of documentation. I have some great ideas for the pineapple, but software isn't my strong suite, so I need all the help that I can get.

Don't get me started, I'm all ranted out :)

Link to comment
Share on other sites

I am very excited to see your project progress, Oli. I have actually been working on something similer. I cheated a bit though; rather than using the pineapple's expansion port, I have an arduino micro connected via USB. So far I have a 4x20 lcd, a few buttons, and a few leds. I am basically using python to talk to the arduino via serial. I will be posting some pictures and more information as soon as I get some time. Hopefully this weekend. :)

Link to comment
Share on other sites

I am very excited to see your project progress, Oli. I have actually been working on something similer. I cheated a bit though; rather than using the pineapple's expansion port, I have an arduino micro connected via USB. So far I have a 4x20 lcd, a few buttons, and a few leds. I am basically using python to talk to the arduino via serial. I will be posting some pictures and more information as soon as I get some time. Hopefully this weekend. :)

Thanks! Sounds good - I think that is a pretty viable method (shame that the hardware bug will tie up the one USB port on the MKV though).

Serial is maybe the best way to communicate with the Arduino rather than the expansion bus anyway (this is how the AR9331 and Arduino communicate in the Dragino / Yun) - with the caveat that you can't use if for debugging the Pineapple if it is use for expansion.

You could also use the serial pins on the MK5 (take care with logic levels though!) - Sailor has some examples if you haven't seen them already:

Yeah, I want to use Python for the library too - we will have to compare notes / try and collaborate on something.

I've got the rest of the parts that I need now, so I'm going to work on my project this weekend. Looking forward to seeing what you come up with!

Link to comment
Share on other sites

We should be pushing this out by the end of the week, sorry for the delay.

Thanks Seb! I am looking forward to it. :)

Thanks! Sounds good - I think that is a pretty viable method (shame that the hardware bug will tie up the one USB port on the MKV though).

.....

Yeah, I want to use Python for the library too - we will have to compare notes / try and collaborate on something.

Sounds great, Oli! Once I make some more progress and clean up my code a bit, I will share. Fortunately, I found the perfect little usb hub. It's similer to the one in the hak shop with the convenient micro usb plug (fits the arduino micro). Unfortunately though, my model also has a useless iphone plug. I think that I'm going to hack it off and add another standard usb plug.

Link to comment
Share on other sites

Fortunately, I found the perfect little usb hub. It's similer to the one in the hak shop with the convenient micro usb plug (fits the arduino micro). Unfortunately though, my model also has a useless iphone plug. I think that I'm going to hack it off and add another standard usb plug.

...just be careful that it can provide enough current. If you don't have any extra power to the hub you might not be able to source enough current when you start adding displays etc to the Arduino and need to run a separate USB antenna at the same time...

Link to comment
Share on other sites

We should be pushing this out by the end of the week, sorry for the delay.

The end of last week or some arbitrary week in the future? :)

For the avoidance of doubt, what exactly is to be "out". Just the documentation of the infusion related methods or "everything"? Full documentation of what is happening in the UI as far as interaction with OpenWRT / utilities is pretty important for most people. For example, how if the UI setting up the wireless configuration etc. Yes, this can all be easily reverse engineered by looking at the source (and I've done this) but some official guide would be useful for the wider community.

Link to comment
Share on other sites

The end of last week or some arbitrary week in the future? :)

For the avoidance of doubt, what exactly is to be "out". Just the documentation of the infusion related methods or "everything"? Full documentation of what is happening in the UI as far as interaction with OpenWRT / utilities is pretty important for most people. For example, how if the UI setting up the wireless configuration etc. Yes, this can all be easily reverse engineered by looking at the source (and I've done this) but some official guide would be useful for the wider community.

Before making such a statement, I suggest you look at where our source link is pointed: http://wifipineapple.com/source. This can be found on the bottom of our website.

Following the release of the webinterface source code, we are going to compile a nice list of PHP and JavaScript functions that we have available for anyone to use. Furthermore, we are going to spend time expanding those functions, getting rid of some code duplication (like tabs) and so on.

Edit: As you can imagine, we are rather busy and will try to document more as we go along. I'm unsure of how much documentation you expect however, as if you want OpenWRT documentation you should take a look at the OpenWRT Wiki.

Best Regards,

Sebkinne

Link to comment
Share on other sites

OK, but that is source (I checked a few days ago and it said there were "no public repositories" so that is newly public withing the last day or so...)

Still no documentation on the API functions (the source was all available anyway by looking at the pineapple filesystem) or code comments full stop.

Glad this is finally out there to submit patches to and under a slightly better license (seems fair enough for the majority of users / community)!

Link to comment
Share on other sites

... we are going to compile a nice list of PHP and JavaScript functions that we have available for anyone to use. ...

This is exactly what I was asking for. For example; I haven't actually looked at the source, but lets look at the karma infusion. Is there a function that is called to start/stop karma, or is something like php exec used? My vision (for what it's worth) would be to have convenient api calls to take care of all of the 'basic' pineapple functions (along with more advanced ones). I realize that the uci and exec can take care of most, if not all of this, but by having well a well documented api that users could refer to it would lower the learning curve for creating useful infusions. This would allow every day users who aren't necessarily php masters to easily create useful contributions. I don't know though, maybe you don't want a flood of 'amateur created' infusions?

I said before that I realize that Hak5 is a small company, and that you guys are busy. I try to keep this in mind before making criticisms. That being said, I am very glad to see that I'm not the only one who is disappointed with what I see as a lack of progress. I take Oli's unofficial expansion hardware as inspiration: even though there is next to zero official documentation, It's still possible to improve and advance functionality (if one is dedicated/skilled/has enough time).

Lastly, I would like to thank Hak5. I have been patient and tried to keep my disappointment to myself because I respect everyone at Hak5, and I very much love your product. Keep on moving forward (but please listen to your customers).

Edited by andyfive
Link to comment
Share on other sites

Thanks for your patience and understanding as we continue to grow. The last 6 months has been a sea change for us. I'm saddened to hear of your disappointment with the lack of progress. I'd think we've made quite significant progress firmware wise since launch, however I see that we can do better in way of documentation and developer support. We'll get there and we'll do it together.

Link to comment
Share on other sites

Thank you Darren. Also, I should have been more specific. I am not disappointed overall. I absolutely LOVE the pineapple, and appreciate very much all of Hak5's hard work. You are correct about making a lot of progress regarding the firmware. It's a bit easy for me to forget this because I am a relative newcomer to the pineapple. I think that the current firmware was 1.2 when I first got my pineapple, so I didn't necessarily see all of the changes first hand.

My disappointment was more towards the lack of documentation. I understand that the pineapple is a work in progress (which is one of the reasons that it's so great), but by implementing some of the recent changes in regards to source code and also improving the documentation situation, it can only be good for the pineapple. The easier it is for newcomers and amateurs to create and make changes, the better it is for this project. I firmly believe that as the documentation improves we will see more and more novel applications popping up.

I am very eager to begin contributing to the pineapple.

Link to comment
Share on other sites

I've decided to take a break of undetermined length from the pineapple, and focus on some other projects that I have going. Hopefully "by the end of the week" will be before I decide to return. (Sorry for the jab. Just feeling a bit frustrated/lied to.)

Link to comment
Share on other sites

I've decided to take a break of undetermined length from the pineapple, and focus on some other projects that I have going. Hopefully "by the end of the week" will be before I decide to return. (Sorry for the jab. Just feeling a bit frustrated/lied to.)

Pretty much my feeling too - but I'll probably carry on with my expansion stuff as it is a good learning experience and I think that the information should be available to the community.

Here is my list of thing that I would like to see:

  • Source in GitHub (it is now) AND actually used (not another USB Rubber Duck code drop and abandon).
  • Firmware on GitHub AND actually used and updated so we can see what is changing.
  • Documentation of how OpenWRT has been modified for the MKV.
  • Documentation of the expansion bus.
  • Documentation of the integration of the web interface/ OpenWRT / MKV hardware - even if this is just links to the relevant OpenWRT help:
    • How are the LEDs configured
    • How are the DIPs configured
    • How is the web interface configured to start.
    • How is the DNS stuff setup and why was the current way of doing things chosen.
    • etc etc
  • Documented build process to build EVERYTHING using the latest source from GitHub - firmware and web interface.
  • Configuration to allow better privacy - I don't want my pineapple connecting to HAK5 servers to check for internet connectivity. Also I don't want to tell HAK5 every single package I install (the cloud.wifipineapple.com redirect does this because it is set as the default repository).
  • GPL license for source code. The code is not what makes the WiFi Pineapple - the unique hardware, show and community do. Look at the code: it is not that fantastic or robust or cutting edge - a motivated individual could rewrite the whole thing in no time and make the official stuff look like rubbish! The hacker community needs open source / free software (ubertooth, hackrf, metasploit, kali, etc). Take Mike Ossmann for instance - he has an great product and it is open source. Is hackrf going to be any less of a success because he has his code licensed under GPL? No - he has a great product. Same goes for the Pineapple.

Yes, I know HAK5 are a small team (as they keep on saying) - but if you sell this kind of product to the hacker / maker community then these are the things you need to do. A good percentage of the community aren't script kiddies or idiots and want a product that allows them to work without unnecessary friction and forced restrictions.

For me, DefCon is the either going to make or break it as far as my involvement is concerned. If the new Karma, HDK and expansion stuff isn't up to par then I'm just going to abandon my Pineapple and find a suitable alternative.

Link to comment
Share on other sites

I hear what you're saying and you're again right that we need better documentation. We're playing catch-up in that regard. I have no problem with all of your statements and as always welcome criticism and the frank discussion.

As a privacy advocate I agree that we could do more in regards to how the current system operates. I can tell you with complete confidence that we have never transmitted any uniquely identifiable information, including serial and pinenumber. We do not log IP addresses, and we have never received any sort of national security letter. We even go as far as to randomize MK5 cartons meaning it would be difficult to identify a MAC or Serial to customers based on order date. We try to make it clear every time a connection will be made since we, as many others, prefer our devices not to be "chatty" on the network. Side loading infusions is always available. I've added the feature request to allow the ip.php url (check for public IP address) to be more easily configured, perhaps from the advanced tab of the configuration page. Perhaps we could even offer an http proxy option for when contacting the pineapple bar.

Now, towards your last comment "The code is not what makes the WiFi Pineapple - the unique hardware, show and community do." -- sure, however none of these would exist without the commercial support of the product. I agree hackers need more great tools like the ubertooth, hackrf, metasploit and kali (none of which would exist without their commercial counterparts). Hackers also need great free video content like Hak5, and innovative devices like the ducky, monkey and pineapple. I would like to consider the WiFi Pineapple part of that list. We also pride ourselves on our ability to provide the community with powerful, unique and expandable hardware at a very reasonable price (wholesale even) - especially when our margins were cut in half from MK4 to MK5 we stand by this ideal. We're committed to making affordable hacker gear, not an expensive 'information security appliance'

That said, as a project manager with a team of people who rely on me - it's difficult to imagine how a wholly unrestricted licence would be of benefit. Especially when the trademark (which I'm not thrilled to have to defend) has already been violated on multiple occasions. This deals damage to the brand we've put our heart and soul into, and it makes it further financially difficult to maintain the symbiotic relationship with Hak5, the show that has been providing free education to the hacker community for 9 years now. Furthermore it makes it difficult to pay for the unique hardware we so love, this community infrastructure, the funding of further software and hardware engineering and overall keeping the shop running. Don't get me wrong I would love to live in a world where this model was sustainable for everyone - and I agree it's working for some (Mike is a good friend), however I'm more than just one guy - I'm directly responsible for the success of the entire team -- Seb, Sara, Paul, Shannon. Even our manufacturing partner is a friend who doesn't make much on the project but does it because he loves Hak5, so in a way we support him too. Past experience with knock-off clones, even bootleg Hak5 DVDs have just made me rather weary.

We absolutely encourage community development and have worked hard to provide a platform for just such a thing. I'd say the abundance of infusions available are a testament to that, and it's only going to get better. The infusion system was built so that developers could contribute in a meaningful way without the need to dig into the entire codebase or cause any fragmentation. On the users end we have a seamless experience similar to modern app marketplaces. In the past few weeks we've opened up even more, with an official build guide http://wiki.wifipineapple.com/index.php/Build_guide and interface on github http://www.wifipineapple.com/source . If you can understand our one and only non-commercial restriction (which is the same CC license as for Hak5 the show) I encourage you to make meaningful contributions to further the faster progress of the project.

Your current "unofficial" contributions are excellent and we welcome this sort of experimentation and development. I hope we can send you an official HDK for your feedback upon release. However, statements such as "not that fantastic or robust or cutting edge" code, seriously you aren't going to make many friends. While I'm not insulted -- I know my MK3 interface wasn't brilliant -- you must admit that the progression since Seb took over is nothing short of fantastic. In the brief period where I played lead developer this project ran at a snails pace. That's not the case since we've been able to afford a full-time developer/maintainer and the community is better for it.

So the question is, how can we better serve the WiFi Pineapple community in a way that doesn't undermine the long term viability of our team, this ever evolving product and thus this community? I hope you know when I say this, you're not wrong in any regard - I'm just not sure it's right for us. Again thank you for your unique perspective, and for the patience and support as we play catch-up on documentation in the scramble to get things ready for defcon. If you'll be there I hope you'll come by the booth for a handshake and chat - it is truly welcomed.

Link to comment
Share on other sites

However, statements such as "not that fantastic or robust or cutting edge" code, seriously you aren't going to make many friends. While I'm not insulted -- I know my MK3 interface wasn't brilliant -- you must admit that the progression since Seb took over is nothing short of fantastic.

I'm not trying to offend, but stating a matter of professional opinion. The direction and concept are good but the execution is a little "sloppy". I'm a professional software developer so I recognize uncommented code without error checking and a good structure when I see it. It might just be a PHP thing (I'm not a PHP coder) but the software engineer side of me says there is no way that you should have all that inline code in those files. The entire interface is pretty much just "screen scraping" a linux command line - fair enough I suppose, but use a proxy or facade rather than 'exec' commands in a PHP file.

Edited by Oli
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...