Jump to content

Would it be possible to install a different server-side language for modules?


Recommended Posts

Hi everyone. I just discovered the Pineapple and its capabilities and was intrigued so I bought one now that they are back in stock. I intend to use it as a learning tool for discovering how these attacks work and how to protect myself and my friends from them. I'm also a programmer and like devices I can "hack" and write software for, and it might be a fun weekend project to build some add-ons and release them to the community.

The thing is, I am loathe to write PHP. I haven't in years and would prefer to avoid it if possible. I was kinda thinking Node.js might be a lightweight alternative to PHP and more fun to develop with. So my question is, what would be involved in setting up node.js inside the Firmware and building modules around it?

My understanding is that the Pineapple's Jasager firmware is based on OpenWRT, which is packaged as a Linux Distro. Installing Node.js on Linux is usually straightforward. So it seems like it might be possible if some effort was put into it.

Has anyone thought about or put any work into this? Or does my meager understanding of how all of this works betray me?

Thanks!

Link to comment
Share on other sites

Thanks for the reply Foxtrot. So if we can install Python, it seems reasonable to think we could install Node. I'll Google for it, but if you (or anyone else) knows where I can learn how to install and use Python on the Pineapple, please share the links.

Cheers

Link to comment
Share on other sites

Thanks for the reply Foxtrot. So if we can install Python, it seems reasonable to think we could install Node. I'll Google for it, but if you (or anyone else) knows where I can learn how to install and use Python on the Pineapple, please share the links.

Cheers

Installing Python on a pineapple ( I think ) has to be installed to a USB, so you can install Python by connecting your pineapple to the internet, then executing

opkg install python --dest usb

you can then just make your python scripts and then chmod them to be executables, by using

chmod +x <filename>.py

Then just execute it like you would normally, with

python <filename>.py

Good luck :)

-Foxtrot

Link to comment
Share on other sites

I would say running NodeJS isn't a good idea on the pineapple. Python on the other hand is something that works just fine.

We have contemplated writing the entire UI in python, but python itself takes up a lot of space. On current devices anyway.

Link to comment
Share on other sites

Just learn PHP

The same has been said (more frequently and more loudly) about PHP. In fact, PHP is probably one of the most hated languages of all time. I think only VB receives more hate than PHP.

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

Also, that guy in the video doesn't know what he's talking about. His explanation of "non-blocking" is completely wrong. PHP (the way most people run it) is incredibly slow itself. His complaint about running a caching server in front of Node.js is bogus, because that's a best practice for scalability regardless of which server-side language you choose. You don't need to use the built-in web server, you can run make regular CGI applications too if you want.

Personally, I'm not a big fan of writing in either PHP or Node.js, but this guys criticism is completely incorrect and ill-informed.

Edited by Sitwon
Link to comment
Share on other sites

Just learn PHP

I already know PHP (in addition to a shit ton of other languages) and I think it's garbage.

But thanks for the video. It was full of misinformation and betrays a total lack of understanding of the platform, but his ignorance was mildly entertaining nonetheless.

Python is fine. Not my first choice but it's definitely serviceable.

Link to comment
Share on other sites

I would say running NodeJS isn't a good idea on the pineapple. Python on the other hand is something that works just fine.

We have contemplated writing the entire UI in python, but python itself takes up a lot of space. On current devices anyway.

Just curious. Why do you say that node would be a bad idea on the Pineapple?

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...