Live data from Hacker News

Airpass – Easily overcome WiFi time limits

airpass.tiagoalves.me

51–60 of 278 posts

Re: Airpass – Easily overcome WiFi time limits

#51
post #43

Alternatively, if you don't want to run the whole Electron app, the money is this line: sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`",

200 bytes for the business logic. 47MB for the UI & boilerplate around the business logic. I get that this may be the easiest way to develop and publish an application today, but it's sad that this is the direction we have taken in recent years.

It’s not the easiest way just the most evangelized. A Qt app even would be a few lines of code, but we’ve done a good job scaring people that learning other languages is bad because we can’t ship features fast enough with non-evangelized frameworks.

Re: Airpass – Easily overcome WiFi time limits

#52
post #46
post #43

Earlier quoted context omitted.

200 bytes for the business logic. 47MB for the UI & boilerplate around the business logic. I get that this may be the easiest way to develop and publish an application today, but it's sad that this is the direction we have taken in recent years.

Modern app bloat in one analogy: Business logic size: ~20 bytes Total app size: ~47 MB = 47,000,000 bytes Bloat factor: 47,000,000 / 20 = 2,350,000 Let’s scale this up and say the business logic is 1 pound. Then the whole app would weigh: 1 lb × 2,350,000 = 2,350,000 pounds What weighs ~2.35 million pounds? - A fully loaded Boeing 747-8: ~987,000 lbs - Another fully loaded 747-8: ~987,000 lbs - A blue whale: ~330,000…

This is a cool visualization, thanks.

Re: Airpass – Easily overcome WiFi time limits

#53
post #43

Alternatively, if you don't want to run the whole Electron app, the money is this line: sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`",

200 bytes for the business logic. 47MB for the UI & boilerplate around the business logic. I get that this may be the easiest way to develop and publish an application today, but it's sad that this is the direction we have taken in recent years.

I keep thinking that this could be solved by just building Electron into the OS as a shared framework so we don't have to have a separate copy for every app, but the more I dig into it, the more I realize I'm just reinventing the web browser.

Re: Airpass – Easily overcome WiFi time limits

#55

Alternatively, if you don't want to run the whole Electron app, the money is this line: sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`",

the hilarious thing is it shells out for the random mac...

Re: Airpass – Easily overcome WiFi time limits

#56
post #29
post #9

Earlier quoted context omitted.

Why does a Mac-only app that shows a menu bar icon and a notification popup need to be Electron…? That’s 30 lines of Swift, max.

If you want a frontend for you app, you probably just use Electron and get it over with in a few minutes instead of digging through the docs for Qt or some other framework. Is it worth it? Probably not, since this is a single-platform app to start with, but JS+HTML are easy to theme and customize, and Qt is... not quite as simple.

No one has to dig through electron docs though right? There is nothing simple about an electron app regardless how little logic you personally programmed on top of it.

Re: Airpass – Easily overcome WiFi time limits

#57

Alternatively, if you don't want to run the whole Electron app, the money is this line: sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`",

Nice, added it as a bash alias.

    alias randommac='sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && sudo ifconfig en0 ether $(openssl rand -hex 6 | sed "s/../&:/g; s/:$//")'

Re: Airpass – Easily overcome WiFi time limits

#58

Here's an equivalent little script for Debian Linux (but should work on most distros), based on classhasclass's comment: NEW_MAC=$(printf '02:%02x:%02x:%02x:%02x:%02x\n' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256))) sudo ip link set wlan0 down sudo ip link set wlan0 address "$NEW_MAC" sudo ip link set wlan0 up You should replace `wlan0` with whatever you see in `ip link show` for yo…

KDE Plasma has a “Random” button next to the MAC address field in the Network Manager UI. I’m on Debian Testing so not sure when it was added.

Re: Airpass – Easily overcome WiFi time limits

#59
post #43

Alternatively, if you don't want to run the whole Electron app, the money is this line: sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`",

200 bytes for the business logic. 47MB for the UI & boilerplate around the business logic. I get that this may be the easiest way to develop and publish an application today, but it's sad that this is the direction we have taken in recent years.

Wow, they optimized the minimal Electron app down to 47 MB?

Re: Airpass – Easily overcome WiFi time limits

#60
post #7

Glad this feature is built into most modern operating systems these days. For MacOS (Sequoia+) you can just forget the network and reconnect to get a new MAC address [1]. Android's documentation for if it decides to generate a new address per connection is a little vague [2], but I'm guessing forgetting and reconnecting works as well, you may also need to flip the "Wi-Fi non-persistent MAC randomization" bit in devel…

Per [1], this only works once per 24 hours on new iOS/macOS versions, and only once per two weeks on older ones though.
Post reply on HN