ππ Theme Hacking Techniques - WiFi Pineapple Pager
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
I want to show you something so cool about the fundamental architecture of the Wi-Fi pineapple pager. For the last few days, I've been playing with an internal build of the next firmware 1.1.3. And yeah, it's got like a lot of really cool stuff. I will probably talk about it another time, like the rendering engine for the fonts like 65% faster and all of these really really cool tweaks we can get to. But one of the things that came about in the development of it is just like a quality of life thing that's literally been possible throughout the entire life of the pager and you can do this with your theme. So I want to just show you and pretty cool.
It's it's such a small quality of life thing but I feel like for me at least it just makes it so much easier. So I don't know if you've noticed this but in a recent build I think it's in 1.1.2 Two, we added it so that to sleep the screen, you can literally just tap the power button. I know your phone's been doing that for years. I don't know about you guys, but I habitually turn off screens. I know that like screen usage is directly tied to battery life and I'm just like a constant screen turner offer. I see people put their phones like in their handbags without turning off their screen and it drives me.
That's not the point of this video. Point of this video is we freed up a menu item because you know that that double tap the power button, you get this little menu, right? The the power menu. And here's the thing. It used to be that you had to open this menu to sleep the screen. That first setting said sleep screen. Well, now it doesn't. Now we have room for something. And so this just kind of came about on a call and I realized, wow, we could have like added this in like 1.0. You could have added this not even waiting for us to add these kind of features. And I want to show you how you can do this on your own pager. Check this out. So essentially, as you know, every component in the Wi-Fi pineapple pager UI is part of this theme architecture that is so bloody simple. It is literally JSON files and PNG assets that
you should really optimize. But any event, so let me just show you over here. I've I've got my cool theme that I'm working on. And essentially this is how this came about. You guys know the power menu literally just this component right here, right? When you double tap that, this is what you get. You know, your lock screen and your lock buttons, all of that. Well, what I did is I added settings and I set the target to quick settings. And so you can target literally anything. It just has to be in your theme JSON. So, if I come back over to my master theme JSON for the whole theme, you'll see we have our power menu which is a target and it's in the components directory under dashboards power menu.json. Right? I just duplicated it as quick settings. So, if we take a look at that quick setting over here, it's just a copy of power menu except now I can get quick access
to settings that I want. And so, get this on my pager. If I now just hit settings, I've got brightness, volume, vibrate, client mode, and client setup. So, get this. If I just let's take a look at this uh at this JSON here for this this quick settings. Uh and and this is, by the way, like a you know, proof of concept. What you're looking at this what's going to ship is probably way more polished by, you know, Corbin and and Dragorn and the whole dev team. But uh in any event, you know, you can see this is like a duplication of that power menu where I use the power menu background, right? And then we've got, like I said, brightness, volume, vibrate, and all of these are, if you haven't played with this, it's actually really simple. I am targeting something that you would normally have to go into a settings menu to play with. But honestly, this is like such this is such a me use case. I am constantly changing
my screen brightness. Again, screen on and off directly to correlated to battery life. So is screen brightness is probably the biggest factor. And I find that like 100% is way too much indoors. But then I move outside and I definitely need more brightness. So when I uh choose this, all it's doing, it's going to bring up that same brightness menu you would have had to go into settings to get. And it's really simple. All this really is is you see the target option dialogue narrow. It's a narrow version of an option dialogue. But how does it know what options to present you? It's given a variable that is dollar sign underscore brightness. All of those internal variables, you know, if they have options and you pass them to an option menu as the target, boom, this will pop up and you can make those changes. Uh and and actually similarly, it works for these guys down here. This is so great. Hang on. This is probably going to blow out the camera, but if I if I now set this at 100%. There you go.
I now have higher brightness. Let's bring that down for the video. Uh, so I could be in the middle of my payload and I'm like doing stuff, but then I move outside and I don't want to have to like exit my payload and restart it. Now, double tap the power menu. I know such a quality of life little thing, but I think it illustrates all of these things that you can do in your own payload. So, even things right here where I can tell the state of vibrate. I can tell that it's off and I can press this button to toggle it on. And how does that work?
Well, we come down here in our theme and you'll see that it targets a thing called an inline toggle. An inline toggle takes a variable. In this case, it is again an internal variable starting with dollar sign underscore. It's called vibrate. And it just toggles the boolean value of vibrate. So, you know, similarly, I can go in and I can change my uh, you know, volume over to mute. So, if I'm in class, I can have it like not interrupt things. And it's just
super simple to be able to add those kind of components. And I even wanted to point out all of these like magical like targets as you can see here. Like I'm over here targeting the the, you know, client setup for client mode wizard. I'm literally just targeting client mode wizard. What is client mode wizard? Well, again, if you come into your theme JSON and we just look for wizard, we can see
we've got the management AP wizard, the client mode wizard, the evil AP wizard. I mean, if you wanted to target the tutorial, you could by literally just doing target tutorial. You can even, and I don't know if I've ever like shown this on a stream, but it's like so powerful and cool. It's it's kind of commented out and unused. But these commands here, you can literally add a command. So if I wanted to like have a UI element in my theme execute an actual like command running as root on the system to I don't know, backup files to USB or SCP or something like that. It'd be like, I don't know, backup. And then we would just give it uh let's just hypothetically say it's like SCP um uh slashroot slash uh uh let's let's
do cpttacr slashroot slashloot you know
all of my loot over to slash USB or wherever my mount point is for my file. It would literally just execute this command if you target it in the theme. And I am just so happy to have these tiny quality of life improvements in this firmware. And I love using this as an opportunity to show you kind of like the flexibility of the theme engine. I have been seeing so many incredible themes that are starting to like stretch the possibilities of the pager more so than say taking the default war games theme and and applying a skin to it. I love that. But we've been seeing custom menus for war driving. I saw an insane uh new theme from Cribbit I have to show you. In fact, there's one that there's a pull request right now for like a Mac OS one that looks absolutely sick and it is completely different from anything that you've ever seen on the pager. And I love that you can literally just go into that theme JSON and create any component you want or target any component you want. Uh so I wanted to point that out because I thought that that kind of like potential for extensibility is awesome and worth highlighting. Obviously, there are a number of really cool other fixes and improvements coming in firmware 1.1.3. I know that there's now a status bar icon for your connection to client mode uh Wi-Fi, which is awesome to just at a glance know like are you connected to the Wi-Fi you think you are. Um and and like you know rendering engine optimization, caching optimizations, and other improvements that I'll get into another time. But I did want to just like point this out because I'm so curious like now that we have this and you can just like, you know, anywhere on the system, double tap, boom, get into a setting. I just, you know, we just on a call like randomly picked these as these are the ones that we would want to have, but what would you want to have? And what are you going to change in your quick settings JSON? And what do you want to add to your theme? I want to hear you guys in the comments. I hope you guys are doing well. Anyway, that's it for now. Trust your technist.





